• Skip to primary navigation
  • Skip to main content
  • Skip to footer

eric c wagner

ramblings, musings, and WordPress

  • About

Category Page Titles in Genesis Framework

March 30, 2014 by Eric Wagner Leave a Comment

This weekend I noticed the name of the category wasn’t appearing at the top of the category pages on this site and another site I run, which are both WordPress sites running the Genesis Framework. You’d think this would be default functionality (spoiler: it is, but I never RTFM.)

Heading to Google I found two code based solutions

http://sridharkatakam.com/show-category-titles-loop-category-pages-genesis/
https://yoast.com/wordpress-archive-pages/

I adopted the first one and came up with:

//* Add Category page titles
add_action ( 'genesis_before_loop', 'fc_show_category_name' );
function fc_show_category_name() {
	$category = get_the_category();
	if (is_category()) {
		echo '<h1>Category: ' . $category[0]->cat_name . '</h1>';
	}
}

But I will still kind of stymied that this wasn’t out of the box functionality. How could StudioPress leave this basic blogging functionality out of it’s framework. Well, they didn’t. It took a quick look at their default theme to see how to handle it.

On the Edit Category page they’ve added a couple of new fields:

category_page

You can even add a description about the category. A bit much for this site, but I can really see its use for other sites I’m working on.

Sometimes it pays to read the manual.

Filed Under: WordPress Tagged With: Genesis Framework

About Eric Wagner

Eric Wagner is the owner of Fifth Cup, a small, highly caffeinated web design and development agency in Portland Maine, and an enterprise technology executive whose passion is helping companies take advantage of technology.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Footer

Connect Online

  • LinkedIn
  • RSS
  • Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 3 other subscribers

Categories

  • Development
  • General
  • Joomla
  • Linux
  • Mental Note
  • Sales
  • Science
  • Tech Toys
  • Uncategorized
  • Web Hosting
  • WordPress

Tags

Amazon.com Apple Watch cache DigitalOcean Genesis Framework Infographic MAMP WordCamp Yoast

Website Design and Development

Copyright © 2023 ยท Eric Wagner