Removing Page Titles | Pretty Pictures Theme

Community Forums Forums Design Tips and Tricks Removing Page Titles | Pretty Pictures Theme

This topic is: not resolved

This topic contains 29 replies, has 7 voices, and was last updated by  braddalton 1 year, 5 months ago.

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #13839

    KBordonaro
    Participant
    Post count: 22

    Hi!

    I used the following code but the page titles are still there.

    /** Remove page titles */
    add_action( ‘get_header’, ‘child_remove_page_titles’ );
    function child_remove_page_titles() {
    if ( is_page() && ! is_page_template( ‘page_blog.php’ ) )
    remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    }

    Help! :)

    Kimberly

    http://www.kimberlybordonaro.com

    #13852

    braddalton
    Participant
    Post count: 10350

    I’ve written a tutorial on this as there’s different ways to hide page titles in WordPress themes.

    Where did you get the php for this?


    #13853

    KBordonaro
    Participant
    Post count: 22

    Thanks, Brad. Great tutorial!

    I’m wondering if there is a way to remove titles from all my websites pages instead of doing it one by one for specific pages. I remember I did this on a previous child theme I used but I don’t recall how.

    BTW, I got the code from searching on this forum. There are quite a few posts, not sure which one I grabbed it from – but it was used in a few of them.

    Cheers,

    Kimberly

    #13856

    braddalton
    Participant
    Post count: 10350

    Bills plugin: Genesis Title Toggle

    http://wordpress.org/extend/plugins/genesis-title-toggle/

    Haven’t tested this plugin but it should do the job based on the description.


    #13877

    SoZo
    Moderator
    Post count: 1573

    Delete this line

    add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );

    from

    // Add back, as post has no format
    else {
    add_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );
    add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    add_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #13892

    KBordonaro
    Participant
    Post count: 22

    @SoZo… I don’t see the snippet. Here’s what I have:

    /** Remove elements for post formats */
    add_action( ‘genesis_before_post’, ‘pp_remove_elements’ );
    function pp_remove_elements() {

    // Remove if post has quote format
    if ( has_post_format( ‘quote’ ) ) {
    remove_action( ‘genesis_before_post_content’, ‘genesis_post_info’ );
    remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }

    // Remove if post has gallery format
    elseif ( has_post_format( ‘gallery’ ) ) {
    add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    add_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }

    // Add back, as post has no format
    else {
    add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    add_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }

     

    @Brad – excellent plugin… except it also removed my header picture on the blog post pages. Strange!

    #13893

    SoZo
    Moderator
    Post count: 1573

    The last one ;)

    // Add back, as post has no format
    else {
    add_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
    add_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );
    }


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #13898

    KBordonaro
    Participant
    Post count: 22

    Hmmmm….

    That removes my header picture whenever I’m on a blog page.

    My “about”, “contact”, and “amplify your brand” pages have my header picture.

    The “homepage”, “brandspiration” and “praise” pages (all blog formats) don’t.

    http://www.kimberlybordonaro.com

     

    #13915

    SoZo
    Moderator
    Post count: 1573

    Ok, put that line back and then use this (not sure why but I wrote it out from scratch instead of copy/pasting and it’s working for me)

    [php]/** Remove page titles */
    add_action(‘get_header’, ‘child_remove_page_titles’);
    function child_remove_page_titles() {
    if (is_page() && ! is_page_template( ‘page_blog.php’ ) )
    remove_action(‘genesis_post_title’, ‘genesis_do_post_title’);
    }[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #13954

    KBordonaro
    Participant
    Post count: 22

    I don’t get it…

    I did exactly as you said and put back the original code, but it is still taking out my header image on blog page, including the front page.

    #13955

    KBordonaro
    Participant
    Post count: 22

    Okay,  I redid it. Now the header image is back to normal…

    But, the added code isn’t removing the page titles.

    :(

    #13956

    KBordonaro
    Participant
    Post count: 22

    PS, You are so awesome John. I really appreciate your help.

    #13967

    docmas
    Participant
    Post count: 40

    i added the title toggler plugin to do the same thing on my agency blog:

    http://thepassiondoctor.com

    it works, yet not sure if the added plugin slows down loading or just changes the php once for each page.

    adam

    #14032

    braddalton
    Participant
    Post count: 10350

    @Brad – excellent plugin… except it also removed my header picture on the blog post pages. Strange!’

    l’ll pass that onto Bill Erickson who’s the plugin author because it shouldn”t do that.


    #14237

    KBordonaro
    Participant
    Post count: 22

    Thanks, Brad.

    If anyone has suggestions on how to the resolve this issue, please chime in. I’d greatly appreciate it. :)

Viewing 15 posts - 1 through 15 (of 30 total)

You must be logged in to reply to this topic.