Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] remove all page titles

Home Forums Support [Resolved] remove all page titles

Home Forums Support remove all page titles

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

    Hi.

    If I want to remove page titles, how do I do it?
    found a code from Tom from different article.

    add_action( ‘after_setup_theme’, ‘tu_remove_all_titles’ );
    function tu_remove_all_titles() {
    add_filter( ‘generate_show_title’, ‘__return_false’;
    }

    Is this the code to remove page titles?
    Where do I paste it to?
    I’d tried paste it into snippet and css, but code no recognized.

    #488095
    Leo
    Staff
    Customer Support
    #488103
    Michael

    Hi.

    I tried with snippet as you’ve suggested.
    snippet>add new.
    pasted the php code and error message came up.

    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 3:

    syntax error, unexpected ‘;’, expecting ‘,’ or ‘)’
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    #488134
    Leo
    Staff
    Customer Support

    Try this:

    add_action( 'after_setup_theme', 'tu_remove_all_titles' );
    function tu_remove_all_titles() {
        add_filter( 'generate_show_title', '__return_false' );
    }
    #488136
    Michael

    Ok. I’ll try it and let you know.

    Thanks.

    #488489
    Leo
    Staff
    Customer Support
    #488555
    Michael

    Problem solved.

    Many thanks Leo.

    #488649
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.