This file contains hidden or 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
| function is_post_type($type){ | |
| global $wp_query; | |
| if($type == get_post_type($wp_query->post->ID)) return true; | |
| return false; | |
| } |
This file contains hidden or 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_filter( 'enter_title_here', 'ts_enter_title_here' ); | |
| function ts_enter_title_here( $title ){ | |
| $screen = get_current_screen(); | |
| if ( 'custom_post_type' == $screen->post_type ) { | |
| $title = 'Custom Post Type Title Text'; | |
| } | |
| return $title; | |
| } |
This file contains hidden or 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_filter('wp_nav_menu', 'add_first_and_last'); | |
| function add_first_and_last($output) { | |
| $output = preg_replace('/class="menu-item/', 'class="first-menu-item menu-item', $output, 1); | |
| $output = substr_replace($output, 'class="last-menu-item menu-item', strripos($output, 'class="menu-item'), strlen('class="menu-item')); | |
| return $output; | |
| } |
This file contains hidden or 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_post_type_support( 'CPTNAME', 'genesis-seo' ); | |
| add_post_type_support( 'CPTNAME', 'genesis-layouts' ); |
This file contains hidden or 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
| // Options Panel | |
| require_once(CHILD_DIR . '/admin/admin-functions.php'); | |
| require_once(CHILD_DIR . '/admin/admin-interface.php'); | |
| require_once(CHILD_DIR . '/admin/theme-settings.php'); |
This file contains hidden or 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
| require_once( CHILD_DIR . '/lib/functions/mobile_detect.php' ); | |
| function xmit_cover_image_rotator() { | |
| if (is_mobile()) { | |
| echo ''; | |
| } | |
| elseif (is_home()) { | |
| echo '<div id="cover-image-rotator">'; | |
| echo '<div class="rotator-wrap">'; |
This file contains hidden or 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 | |
| add_theme_support('loop-standard'); | |
| if ( ! function_exists( 'dynamic_loop' ) ) { | |
| function dynamic_loop() { | |
| global $dynamic_loop_handlers; | |
| if ( empty( $dynamic_loop_handlers ) || ! is_array( $dynamic_loop_handlers ) ) | |
| return false; | |
| ksort( $dynamic_loop_handlers ); | |
| foreach ( (array) $dynamic_loop_handlers as $handlers ) { | |
| foreach ( (array) $handlers as $function ) { |
This file contains hidden or 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 Viewport meta tag for mobile browsers */ | |
| add_action( 'genesis_meta', 'storewithstyle_add_viewport_meta_tag' ); | |
| function storewithstyle_add_viewport_meta_tag() { | |
| // echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>'; | |
| echo '<meta name="viewport" content="width=1080" />'; | |
| } |
This file contains hidden or 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_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' ); | |
| function custom_load_custom_style_sheet() { | |
| wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/css/custom.css', array(), CHILD_THEME_VERSION ); | |
| } | |
| //* Replace default style sheet | |
| add_filter( 'stylesheet_uri', 'custom_replace_default_style_sheet', 10, 2 ); | |
| function custom_replace_default_style_sheet() { | |
| return CHILD_URL . '/css/genesis.css'; | |
| } |
This file contains hidden or 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 | |
| /* | |
| replacing the default "Enter title here" placeholder text in the title input box | |
| with something more descriptive can be helpful for custom post types | |
| place this code in your theme's functions.php or relevant file | |
| source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963 | |
| */ |
OlderNewer