-
-
Save davidperezgar/efa94af7ec25e60a96aa3495246d2f13 to your computer and use it in GitHub Desktop.
Taxonomy title and description (category, tag, taxonomy) in Genesis Child Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* 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>'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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