This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//** Redirect if not logged in | |
if ( ! is_user_logged_in() && 'wp-login.php' !== $pagenow ) { | |
wp_redirect( wp_login_url() ); | |
exit; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file controls the single view of the Recipe CPT | |
*/ | |
/** | |
* This is where you would put your custom mods. Just hook them (or unhook) to the proper location. | |
*/ | |
genesis(); //* <-- Just make sure this is at the END of the file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace [username] with your GitHub username (in both places). | |
# Replace [project]/[repository] with the project and repository where the issue resides. | |
# Replace [base] with the destination branch you wish to PR to (usually master or develop) | |
# And obviously, don't leave the [] brackets in there. | |
# Usage: | |
# @git-pr 999 features/999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Only turn on HTML5 for comment list | |
add_theme_support( 'html5', array( 'comment-list' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Debug redirect | |
add_filter( 'wp_redirect', function( $location ) { | |
if ( home_url() == $location ) { | |
print_r( debug_backtrace() ); | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Fruit_List { | |
private $fruit = array(); | |
function __construct() { | |
$this->add_fruit( array( | |
1 => 'apple', | |
2 => 'orange', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
add_filter( 'stylesheet_uri', 'custom_replace_default_style_sheet', 10, 2 ); | |
/** | |
* Replace main theme style sheet with custom one if viewing post in a particular category. | |
* | |
* Note: Replace X with the category ID you want to target. | |
*/ | |
function custom_replace_default_style_sheet( $stylesheet, $stylesheet_dir ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Add Accessibility support | |
add_theme_support( 'genesis-accessibility', array( 'headings', 'drop-down-menu', 'search-form', 'skip-links' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ## Screen reader text | |
--------------------------------------------- */ | |
.screen-reader-text, | |
.screen-reader-text span, | |
.screen-reader-shortcut { | |
position: absolute !important; | |
clip: rect(0, 0, 0, 0); | |
height: 1px; | |
width: 1px; |
OlderNewer