Skip to content

Instantly share code, notes, and snippets.

@srikat
Created October 6, 2013 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srikat/6850294 to your computer and use it in GitHub Desktop.
Save srikat/6850294 to your computer and use it in GitHub Desktop.
<?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() {
global $post;
if ( is_singular() ) {
the_content();
if ( is_single() && 'open' === get_option( 'default_ping_status' ) && post_type_supports( $post->post_type, 'trackbacks' ) ) {
echo '<!--';
trackback_rdf();
echo '-->' . "\n";
}
if ( is_page() && apply_filters( 'genesis_edit_post_link', true ) )
edit_post_link( __( '(Edit)', 'genesis' ), '', '' );
}
elseif ( 'excerpts' === genesis_get_option( 'content_archive' ) && !is_category('featured') ) {
the_excerpt();
}
else {
if ( genesis_get_option( 'content_archive_limit' ) )
the_content_limit( (int) genesis_get_option( 'content_archive_limit' ), __( '[Read more...]', 'genesis' ) );
else
the_content( __( '[Read more...]', 'genesis' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment