I am testing layouts for archive pages for posts and want the page title to be gone.
I saw a code snippet in a response to someone’s question earlier on a related topic, but the snippet doesn’t work–why?
add_action( ‘after_setup_theme’, function() {
remove_action( ‘generate_archive_title’, ‘generate_archive_title’ );
} );
I also tried CSS-also no effect .entry-title { # as well as h2.entry-title a and .entry-title a display: none; }
It could be that the current PHP snippet you added has syntax errors. This especially occurs if the quotation marks used are curly ones instead of straight ones.
Thanks, Fernando! I made an error-I was experimenting with elements and one of them has {{entry-title}} in it. Appreciate the reminder to be careful with curly quotes!