• 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

Moving page titles to the main header – but not on the homepage

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 › Moving page titles to the main header – but not on the homepage

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • March 29, 2016 at 5:38 am #182422
    studionoobly
    Member

    Is it possible to move the main page titles to the top header but not on the home page?

    I have tried the following but not only did it move the title on the homepage but it removed all the post titles and moved the first post title into the main heading?

    add_action( 'get_header', 'move_titles_all_single_pages' );
    function move_titles_all_single_pages() {
         if (!is_page(array('home')) || is_singular('page') ) {
            remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    				add_action( 'genesis_header', 'genesis_do_post_title', 10 );
        }
    }

    Would be good if it could only effect pages and posts but not the post titles on the archive pages and not the home page.

    Thanks

    http://n/a, working local
    March 29, 2016 at 9:14 am #182454
    Brad Dalton
    Participant

    Try ( untested ) these conditionals

    if ( is_singular(array('post','page'))) {
    

    Tutorials for StudioPress Themes.

    March 29, 2016 at 9:20 am #182455
    studionoobly
    Member

    Thanks Brad,

    I think I just figured it out.

    On the homepage I added the following:

    add_filter( 'genesis_post_title_text', 'genesis_default_title_new', 10, 3 );
    	function genesis_default_title_new() {
    		remove_filter( 'genesis_post_title_text', 'genesis_default_title', 10, 3 );
    }

    And in functions I added:

    add_action( 'get_header', 'child_remove_titles' );
    function child_remove_titles() {
        if ( is_singular() ){
            remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    				add_action( 'genesis_header', 'genesis_do_post_title' );
        }
    }

    Your way looks a bit cleaner though, I'll give that a go and let you know how I get on.

    Thanks,

    March 29, 2016 at 9:25 am #182456
    Brad Dalton
    Participant

    How about the page using the blog page template?


    Tutorials for StudioPress Themes.

    March 29, 2016 at 9:32 am #182460
    studionoobly
    Member

    Indeed I haven't got round to moving the title to the header in that page yet. It seems to turn up just after "genesis_before_loop" and right after the breadcrumb menu, is there a filter or hook to grab that badboy too?

    Thanks

    March 29, 2016 at 9:50 pm #182501
    Brad Dalton
    Participant

    The conditional

    is_singular()

    should work for the blog page template also.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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