Executive Child Theme – Remove Page Title

Community Forums Forums Design Tips and Tricks Executive Child Theme – Remove Page Title

This topic is: not resolved

This topic contains 7 replies, has 4 voices, and was last updated by  facupuig 2 years ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1665

    facupuig
    Participant
    Post count: 4

    Hi there, I tried to remove using the following code:

    /** 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’ );
    }

    place that code in the functions.php, but it tells me:

    Parse error: syntax error, unexpected T_STRING in /home/user/public_html/wp-content/themes/executive/functions.php on line 190

    How can I fix it? Thank you

     

    #1666

    SoZo
    Moderator
    Post count: 1573

    There are no erros in what you posted. Where did you place it? Did you try at the very end?


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

    #1720

    facupuig
    Participant
    Post count: 4

    Yup at the very end.

    #1928

    SoZo
    Moderator
    Post count: 1573

    Which theme are you using? Is there “?>” at the end of the functions file? If so you need to keep everything before that.


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

    #2731

    cotaylo
    Participant
    Post count: 29

    Hi. I am having a similar problem. I tried to add the suggested code to remove the author box on single posts and I got this error:

    Parse error: syntax error, unexpected $end in /home/vietnam/public_html/wp-config.php on line 1

    So I tried to follow Nick’s tips and tricks tutorial for wp-config debugging and I also deleted my functions.php using filezilla and re-uploaded it. I also checked for the ?> and it’s not there. After all this, I still have the dreaded white screen.

    Can you help me figure out what the heck I am doing wrong?

    http://216.172.181.96/~vietnam

    Thank you!

    #2825

    facupuig
    Participant
    Post count: 4

    @SoZo I am using the Exceutive Child Theme, you can take a look at http://www.souldrivers.net and there is no “?>” at the end of the file, should I add that?

    Thank you.

    #2827

    Ozzy
    Participant
    Post count: 214

    if you tried using add_action( ‘genesis_before’, ‘child_remove_page_titles’ ); instead of add_action( ‘get_header’, ‘child_remove_page_titles’ );?


    #3143

    facupuig
    Participant
    Post count: 4

    I got it! Coda was pasting

    add_action( 'genesis_before', 'child_remove_page_titles' );
    function child_remove_page_titles() {
    if ( is_page() &&amp ! is_page_template( 'landing.php' ) )
    remove_action( 'genesis_post_title', 'genesis_do_post_title' );
    }

    Instead of && was &&amp

    I fixed that and it is working, now… what is the difference between ‘genesis_before’ and ‘get_header’ for this matter?

    Thank you!!!

    • This reply was modified 2 years ago by  facupuig. Reason: fixing code
    • This reply was modified 2 years ago by  facupuig. Reason: fixing code
    • This reply was modified 2 years ago by  facupuig. Reason: fixing code
    • This reply was modified 2 years ago by  facupuig. Reason: fixing code
Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Executive Child Theme – Remove Page Title’ is closed to new replies.