Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created February 27, 2015 01:21
Show Gist options
  • Save fernandiez/df5fe535dd41955adfc7 to your computer and use it in GitHub Desktop.
Save fernandiez/df5fe535dd41955adfc7 to your computer and use it in GitHub Desktop.
Taxonomy title and description (category, tag, taxonomy) in Genesis Child Theme
//* 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
*/
add_action( 'genesis_before_loop', 'rv_output_category_info' );
function rv_output_category_info() {
if ( is_category() || is_tag() || is_tax() ) {
echo '<div class="archive-description">';
echo '<h1 class="archive-title">';
echo single_term_title();
echo '</h1>';
echo term_description();
echo '</div>';
}
}
/* Adding WordPress Taxonomy title and description styles (category, tag, taxonomy)
---------------------------------------------------------------------------- */
.archive-description {
background-color: #ccc;
font-size: 16px;
margin-bottom: 20px;
padding: 40px 40px;
}
.archive-title {
font-size: 36px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment