• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding Category Names to page-title.php in Minimum 2.0

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding Category Names to page-title.php in Minimum 2.0

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 12 years, 3 months ago by Dan B.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 11, 2013 at 8:38 pm #45385
    Ted
    Participant

    I'm developing a site for a client that will rely heavily on categories for navigating.

    I'd like to add the name of the blog category to the Page Title areafor posts and archive pages that fall within that category.

    For example, say I've got a category named 'Beauty.' For the archive pages and posts that are in that category, where it normally says, 'From the Blog' in the Page Title area, I'd like it to say, 'Beauty.'

    I'm playing around with the page-title.php file but really just guessing at what I'm doing.

    Any help would be awesome!!

    Thanks!

    Ted

    http://imageperceptions.com/worldofaesthetics/
    June 11, 2013 at 9:22 pm #45390
    Ted
    Participant

    Just to followup. I've added similar code for each category, to the page-title.php file:

    elseif ( is_category(beauty)|| is_singular() ) {
    echo '<div id="page-title"><div class="wrap"><p>' . __( 'Beauty News, Tips and more...', 'minimum' ) . '<a class="page-title-button" href="http://feeds.feedburner.com/ImagePerceptionsInc">' . __( 'Subscribe', 'minimum' ) . '</a></p></div></div>';
    }

    There are 9 categories that this applies to. I was hoping to figure out code that would just require one piece of code that would just automatically grab the category name so there wasn't so much repetition in the code.... but this does what I need.

    June 19, 2013 at 3:58 am #46705
    Dan B
    Participant

    I'd like to do something similar as well, except that I don't want to hard code the categories into the page-title.php file as you have.

    Also, for a few pages, I'd like the actual page name to be in the page-title area. But so far, can't get that to work. Not quite sure how to call it.

    Any ideas?


    Dan @ ZindaMedia
    Marketing, Fundraising and Social Media strategies for non-profits.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble