Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Displaying Category Headings on all Category Archive Pages in Genesis

May 2, 2014 1 Comment

In a Genesis WordPress theme you can add in a headline to display for a Category archive page, but this headline only appears on the initial category archive page, so  if pagination exists for subsequent archive pages then other pages do not have the title rendered.

genesis-category-heading

 

To get around this issue if you have pagination on your category archives the problem is better solved with a function in your themes function.php file

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

The function above will only run if the content is a category page and then render the actual category title in h1 tags with a class of archive-title set to it. It will display on all the same category archive pages.

If you wanted something other than the category title you drop the single_cat_title for something else…

function themeprefix_category_header() {
if ( is_category() )  {
	echo '<h1 class="archive-title">Your Heading Here</h1>';	
	}
}
add_action( 'genesis_before_loop' , 'themeprefix_category_header' );

 

The action will place the archive heading just outside of the loop.

genesis-category-before-loop

This can also be applied to tags

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

A lot of sites won’t have a need for this but when those archives build over time or a small amount of posts per archive page is applied its a handy setting to add.

Gist.

Cats: WordPress

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • San Francisco orders Apple, Google to remove nudify apps from app stores
  • Apple sues OpenAI after ex-engineer allegedly used bug to steal trade secrets
  • Apple and Samsung benefit as memory shortage pushes smartphone shipments to historic lows
  • Apple takes Epic fight over app store fees to the Supreme Court
  • Russian citizens told "switch to Android" after Apple blocks key Russian apps

RSS mac surfer

  • Apple Music Raises Prices in the U.S.
  • Apple Reclaims World's Most Valuable Company Title
  • San Francisco Orders Apple and Google to Pull Nudify Apps
  • Apple Ramps Up Vapor Chamber Orders for Foldable iPhone
  • AppleCare+ Raises Prices for Mac and iPad Plans

Donate

Copyright © 2026· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2026 · gee on Genesis Framework · WordPress · Log in