Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active August 29, 2015 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilgee/6c0414cfef06e41a6606 to your computer and use it in GitHub Desktop.
Save neilgee/6c0414cfef06e41a6606 to your computer and use it in GitHub Desktop.
Add Category Heading to Each Page in Pagination in Genesis
<?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