Created
January 10, 2014 05:32
-
-
Save srikat/8347446 to your computer and use it in GitHub Desktop.
Add Post categories above Post titles and display only Post tags in entry footer in Genesis. Scope: Single Posts, Search results page, static Pages to which 'Blog' Page Template is applied. Context: http://sridharkatakam.com/moving-post-categories-entry-meta-post-title-genesis/#comment-2309
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_action( 'template_redirect', 'sk_categories_above_titles' ); | |
function sk_categories_above_titles() { | |
if ( ! ( is_singular('post') || is_archive() || is_search() || is_page_template('page_blog.php' ) ) ) | |
return; | |
add_action ( 'genesis_entry_header', 'sk_show_category_names', 9 ); | |
add_filter( 'genesis_post_meta', 'sk_post_meta_filter' ); | |
} | |
function sk_show_category_names() { | |
echo do_shortcode('[post_categories before="Filed Under: "]'); | |
} | |
function sk_post_meta_filter($post_meta) { | |
$post_meta = '[post_tags]'; | |
return $post_meta; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you wish to expand the scope to include Posts listing on homepage as well, change
to