• 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

How to change and add extra formatting to a page's title

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 › General Discussion › How to change and add extra formatting to a page's title

This topic is: resolved
  • This topic has 3 replies, 2 voices, and was last updated 9 years, 4 months ago by Toon61.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 3, 2017 at 8:38 am #202400
    Toon61
    Member

    Hi all,
    I'm currently working on a site where pages are dynamically generated.
    These pages get random titles in the form of two parts of numbers seperated by a -. These numbers must be kept because they are also used as the page's slug.
    But when a page is visited in the browser the page title (h1) reads something like this:

    
    <header class="entry-header">
    <h1 class="entry-title">235493778405-33445</h1>
    </header>
    

    Is there a way to hook into a page and change the displaying title to a more readable and understandable line of text like 'Company name - Additional info' without the need to go into WP Dashboard or the MySQL database and manually change the display title. Like this:

    
    <header class="entry-header">
    <h1 class="entry-title">Company name</h1>
    <h3 class="sub-title">Additional info</h3>
    </header>
    

    Any help is appreciated.

    March 3, 2017 at 12:02 pm #202406
    Victor Font
    Moderator

    There are a couple of ways to approach this. With PHP you can change the content via the apply_filters( 'genesis_post_title_output', "$output \n", $wrap, $title ); filter. You would do something like this in functions.php:

    add_filter( 'genesis_post_title_output', 'my_custom_title' );
    function my_custom_title($output) {
        /* put your custom code here */
        $output = '<h1 class="entry-title">Company name</h1>';
        $output .= '<h3 class="sub-title">Additional info</h3>';
    
        return $output;
    }

    I haven't tested this, but this should point you in the right direction. The alternative is to change the content with jQuery.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 6, 2017 at 1:45 am #202540
    Toon61
    Member

    Victor,
    Thanks for the reply. I'll definitively try your approach.

    March 6, 2017 at 2:11 am #202541
    Toon61
    Member

    Victor,
    I've just tried your approach and it does exactly what I need.
    Okay, I'll have to do some PHP string manipulation (not that hard) and other stuff, but the basics works.
    Thank you for pointing me in the right direction!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 2026 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