Created
February 27, 2015 01:21
-
-
Save fernandiez/df5fe535dd41955adfc7 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 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>'; | |
} | |
} |
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