Site logo

Archived topic

remove all page titles

7 replies · Started by Michael on February 4, 2018

Viewing posts 1–8 of 8

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.

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.

Try this:

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

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

Thanks.

Sounds good.

Problem solved.

Many thanks Leo.

No problem!

This archived topic is closed to new replies.