Archived topic
Remove category title and description
5 replies · Started by Alex on April 7, 2023
Hi,
I'd like to use a Hook for Category archive title and description and I'd need to disable the main ones. Is this possible?
Hi Alex,
If you are using a block element - page hero for the title and description, then there's a built-in option to disable the default title in the element itself:
https://docs.generatepress.com/article/block-element-page-hero/#disable-title
Hi Ying,
I'm using a Hook because when I use a Header, I get the block behind the query on the cat archive page. (image URL in private)
Hi there,
you can add this PHP Snippet to remove the archive title and description:
add_action( 'wp', 'lh_remove_archive_title' );
function lh_remove_archive_title() {
remove_action( 'generate_archive_title', 'generate_archive_title' );
}
How to add PHP: https://docs.generatepress.com/article/adding-php/
Thank you David
You're welcome