Hide Page Titles In Genesis

You can use either PHP code or CSS to remove or hide page titles in Genesis.

PHP will completely remove your titles so they won’t output in the source code.

CSS will hide your titles however they will be visible in the source code.

Different Code For XHTML & HTML 5 Themes

Note: The code snippets on this page work with sites running the old XHTML markup. For sites running HTML 5, please replace:

remove_action('genesis_post_title', 'genesis_do_post_title');

With:

remove_action( 'genesis_entry_header', 'genesis_do_post_title' );

Hiding Page Titles Sitewide

After installing the plugin you’ll find a check box in your Genesis > Theme Settings.

remove page titles sitewide

This settings enables you to remove all page titles on your entire site and any new pages added will not display page titles either.

Remove Page Titles On Per Page Basis

At the end of all your Edit Page screens, you’ll find another module which offers a checkbox for hiding page titles on a per page basis.

e Page Title Per Page Basis

The plugin has been developed by Bill Erickson who had also developed 20 odd plugins for Genesis.

Remove Page Titles Based On Conditions

You can also remove page titles using conditional tags.
Here’s an example:

add_action('get_header', 'remove_page_titles');
function remove_page_titles() {
if (is_page(54)) {
remove_action('genesis_entry_header', 'genesis_do_post_title');
}
}

This will remove the page title from the page with an I.D of 54.

You can easily change the conditional tag to suit your own needs.

Remove ALL Post/Page Titles in Genesis

remove_action('genesis_entry_header', 'genesis_do_post_title');

Paste this code into your child themes functions.php file to remove all post and page titles sitewide.

Remove Single Page Titles Including Sub Pages

This code will remove all page titles for both parent and child (sub) page titles.

Remove Page Titles Exclude Archive & Blog Page Titles

This code removes page titles from all pages excluding all archive & blog pages.

Hide Page Titles Using CSS

You could also hide page titles using CSS.

This method will work regardless of which theme you are using.

Related Code Snippets


Comments

4 responses to “Hide Page Titles In Genesis”

  1. mommaroodles Avatar
    mommaroodles

    You might want to add that the code above works only with the pre HTML5 hooks

    For HTML5 child themes

    use the following:

    [code]
    //Remove title from all pages and posts
    remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
    [/code]

    1. Brad Dalton Avatar
      Brad Dalton

      Thank you Melanie.

      The post was published before Genesis supported HTML 5 however i have updated it with the alternative code.

  2. I used the plug-in but the problem is I want to remove the page title on the blog template page – but when I use the plug-in on that template, it removes the post titles as well. Any solution for that?

    1. Brad Dalton Avatar
      Brad Dalton

      I would just use CSS instead.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.