Last active
August 29, 2015 14:00
-
-
Save neilgee/6c0414cfef06e41a6606 to your computer and use it in GitHub Desktop.
Add Category Heading to Each Page in Pagination in Genesis
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
<?php | |
//do not copy the opening php tag above | |
/** | |
* Add Category and Tag Heading to Each Page in Pagination | |
* | |
* @package Category and Tag Headings on all archive pages | |
* @author Neil Gee | |
* @link http://coolestguidesontheplanet.com/displaying-category-headings-category-archive-pages-genesis/ | |
* @copyright (c) 2014, Neil Gee | |
*/ | |
function themeprefix_category_header) { | |
if ( is_category() ) { | |
echo '<h1 class="archive-title">'; | |
echo single_cat_title(); | |
echo '</h1>'; | |
} | |
} | |
add_action( 'genesis_before_loop' , 'themeprefix_category_header' ); | |
function themeprefix_tag_header() { | |
if ( is_tag() ) { | |
echo '<h1 class="archive-title">'; | |
echo single_tag_title(); | |
echo '</h1>'; | |
} | |
} | |
add_action( 'genesis_before_loop' , 'themeprefix_tag_header' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment