Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active December 24, 2015 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save srikat/6843198 to your computer and use it in GitHub Desktop.
Save srikat/6843198 to your computer and use it in GitHub Desktop.
Show full content for posts in category archive page of a specific category in Genesis. Details: http://sridharkatakam.com/display-full-content-category-pages-selected-categories-genesis/
<?php
add_action( 'genesis_before_loop', 'sk_full_content_specific_category' );
function sk_full_content_specific_category() {
if (is_category('featured')) {
// remove_action( 'genesis_post_content', 'genesis_do_post_content' ); /* Pre-HTML5 */
remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); /* HTML5 */
// add_action( 'genesis_post_content', 'sk_do_post_content' ); /* Pre-HTML5 */
add_action( 'genesis_entry_content', 'sk_do_post_content' ); /* HTML5 */
}
}
function sk_do_post_content() {
the_content();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment