Skip to content

Instantly share code, notes, and snippets.

@davidperezgar
Forked from fernandiez/functions.php
Created October 21, 2016 11:11
Show Gist options
  • Save davidperezgar/efa94af7ec25e60a96aa3495246d2f13 to your computer and use it in GitHub Desktop.
Save davidperezgar/efa94af7ec25e60a96aa3495246d2f13 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_action( 'genesis_before_loop', 'cmk_output_category_info' );
function cmk_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