How to Remove Page/Post Titles in Genesis Child Themes

No matter what type of WordPress development you’re involved in, it’s quite likely that you’ve come across the awesome Genesis Framework and its plethora of beautiful child themes. While we ultimately decided to go a different route in designing 4dev.net, we did spend some time with the clean and mobile responsive Minimum child theme on the Genesis framework during initial development – and what a fantastic theme it is, especially for blogs strongly focused on textual content.

In testing, we proceeded to use the top ribbon area for post and page titles instead of its intended call-to-action text; this rendered the main titles in the content body redundant, and so we set about figuring out how to remove titles on posts and pages in favor of their new, improved placement in the header ribbon.

[adsense_id=”1″]

With a little help from the friendly folks over at StudioPress and the nifty “is_singular” conditional used by WordPress, we managed to remove the included titles on posts, pages and attachments, while leaving them intact on the home and archive pages.

If you’d like to achieve the same thing on any Genesis child theme, you can do so by adding this code to your Genesis child theme’s functions.php file:


/** Remove page/post/attachment titles */
add_action( 'get_header', 'child_remove_page_titles' );
function child_remove_page_titles() {
if ( is_singular() )
remove_action( 'genesis_post_title', 'genesis_do_post_title' );
}

Comments

  1. fantastic, this worked perfectly!!!! Thank you!!!!!

  2. Thank you, it did help me without spending too much time on doing it by myself:)
    In my case I wanted to remove title for one category only. Please note: you need to put not the name of the category, but its slug found under Categories admin section. So in my case the code was:

    /** Remove page/post/attachment titles */
    add_action( ‘get_header’, ‘child_remove_page_titles’ );
    function child_remove_page_titles() {
    if ( is_category(‘name-of-my-category’) )
    remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    }

    • Ho Yuri – thanks for the feedback, and the solution to your own problem! Hopefully we’ve got Genesis users covered from all angles here now.

  3. Many thanks for this, worked for me too.

    Now off to find the answer for the next issue – changing the colour of the header.

    Cheers

  4. Just an FYI but with the switch to Genesis 2.0 and HTML 5 you will need to change one line if your code.

    remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );

    needs to be changed to

    remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );

    Other than that your code worked great for me!

    Thanks!

    • You sir, are a gentlemen and a scholar. I have seen the same code plastered across multiple sites for removing the page titles, but didn’t realize it changed with the update to 2.0. Simply changing genesis_post_title to genesis_entry_header worked like a charm.

      I award you three internet points.

  5. Thank you… Thank you!!

  6. Ugh… wish it worked. I used both the Genesis admin panel to disable ALL breadcrumbs. Still showing a title. Tried your code, but it’s still there. Anyone can help?
    http://streamweavers.net/
    Thanks in advance,
    Andre

    • When/where you post this code matters. For example, if you simply add it to your functions.php file it may run before ‘genesis_do_post_title’ is ever added to ‘genesis_post_title’.

      To make sure your code runs after genesis has completed setting everything up, hook the whole thing into ‘after_setup_theme’ or some similar hook. So for example:

      add_action(‘after_setup_theme’,’after_setup_theme_customize’);
      function after_setup_theme_customize() {
      //code from this article
      }

  7. doesn’t work for me either, at ocalashriners.com i’m working on.
    i did upgrade to genesis 2.0 and the child theme is lexicon, which i believe is no longer supported, so maybe that’s the issue. (i didn’t create the site, just trying to fix a few things for the client)

  8. This worked on one site but on a new one, using version 2 with the Sample Theme, even with Wade’s workaround I am still seeing the page titles.
    Why is it so hard to remove the page names in the first place? Seems like something most people would want to do that anyway….

  9. i hate genesis – it’s so opaque.

  10. ah, the answer… use the Genesis Title Toggle plugin – let’s you show/hide the title on a page by page basis. PERFECT!

  11. Thanks so much for this! Just what I was looking for to customize in my blog design site.

  12. how I can remove entry title in pages only, not in category and posts in minimum genesis…please help me….

    • I’m looking to do the same thing as madiha. I want to remove all page titles. I’d rather not install a plugin to do this. Any help would be appreciated. Thanks!

  13. Hi,

    Just did this and it did NOT work!

    I am now getting an internal server error 500 and cannot fix it. I have replaced the wp-admin files, the wp include files and renamed ht access files. Still nothing works

    Please how can I fix my site?

Leave a Reply to Anthony Cancel reply

*