Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created October 4, 2016 23:32
Show Gist options
  • Save fernandiez/ec7d827831b6fba52d05338642b4551c to your computer and use it in GitHub Desktop.
Save fernandiez/ec7d827831b6fba52d05338642b4551c to your computer and use it in GitHub Desktop.
Adding WordPress Taxonomy title and description (category, tag, taxonomy)
//* Adding WordPress Taxonomy title and description (category, tag, taxonomy)
/**
* Add Category Heading to Each Page in Pagination in Genesis
* @link https://gist.github.com/neilgee/6c0414cfef06e41a6606
* Prints a category's title and description in Genesis
* @link https://gist.github.com/EngageWP/df43e156e76fa5cdd6c0
*/
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
add_action( 'genesis_before_content_sidebar_wrap', 'rv_output_category_info' );
function rv_output_category_info() {
if ( is_category() || is_tag() || is_tax() ) {
echo '<div class="archive-description">';
echo '<h1 class="entry-title">';
echo single_term_title();
echo '</h1>';
echo term_description();
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment