neilgee
5/2/2014 - 5:35 AM

Add Category Heading to Each Page in Pagination in Genesis

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' );