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
/** original code (don't copy this part) **/ | |
if ( is_post_type_archive( 'staff' ) || is_singular( 'staff' ) || is_tax('staff-position') ) | |
$post_meta = '[post_terms taxonomy="staff-position" before="Position: "]<br/>[post_tags before="Tagged With: "]'; | |
/** this is the after (edited) code. be careful, watch the brackets! **/ | |
if ( is_post_type_archive( 'staff' ) || is_singular( 'staff' ) || is_tax('staff-position') ) { | |
$post_meta = '[post_terms taxonomy="staff-position" before="Position: "]<br/>[post_tags before="Tagged With: "]'; | |
add_filter( 'genesis_link_post_title', '__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( 'comment_form_defaults', 'dc_change_form_title'); | |
function dc_change_form_title($arg) { | |
$arg['title_reply'] = __('Please Comment'); | |
return $arg; | |
} |
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('genesis_before', 'dc_cut_out_content'); | |
function dc_cut_out_content() { | |
if ( is_page('Sample Page') ) { | |
remove_action ('genesis_loop', 'genesis_do_loop'); | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' ); | |
} | |
} |
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 featured image to archive **/ | |
add_action( 'genesis_entry_header', 'dc_add_feats_archive' ); | |
function dc_add_feats_archive () { | |
if ( is_archive() ) { | |
if ( has_post_thumbnail() ) { | |
the_post_thumbnail(); | |
} | |
} | |
} |
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( 'body_class', 'dc_parent_body_class' ); | |
function dc_parent_body_class( $classes ) { | |
if( is_page() ) { | |
$parents = get_post_ancestors( get_the_ID() ); | |
$id = ($parents) ? $parents[count($parents)-1]: get_the_ID(); | |
if ($id) { | |
$classes[] = 'top-parent-' . $id; | |
} else { | |
$classes[] = 'top-parent-' . get_the_ID(); | |
} |
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 | |
/** | |
* Search Results Template File | |
*/ | |
get_header(); ?> | |
<header> | |
<h1>Search Results: "<?php echo get_search_query(); ?>"</h1> | |
<br> | |
</header> | |
<?php if ( have_posts() ) : // results found?> |
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
// This will be in your child theme's functions.php. | |
// Change the figures below to match your header image size. | |
add_theme_support( 'genesis-custom-header', array( | |
'width' => 100, | |
'height' => 100 | |
) ); |
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( 'genesis_post_meta', 'dc_post_meta_filter', 20 ); | |
function dc_post_meta_filter($post_meta) { | |
$post_meta = do_shortcode('[post_categories before="Category: "] [post_tags before="Tags: "]'); | |
return $post_meta; | |
} | |
// OR just pull out all Post Meta material. I'm sure you can think of cases for Post (or Custom Posts) that need none of this. | |
remove_action('genesis_entry_footer', 'genesis_post_meta'); | |
// OR remove "Filed Under: " and separators, leaving just the category names and links. I have extra spaces for readability (optional). |
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
.head-wrap { | |
position: fixed; | |
width: 100%; | |
z-index: 999; | |
min-height: 100px; | |
margin-bottom: 0; | |
} | |
.site-header, .header-image .site-title a { | |
min-height: 100px; | |
} |
NewerOlder