[Support request] Remove the title on category-archive pages

Home Forums Support Remove the title on category-archive pages

This topic contains 3 replies, has 3 voices, and was last updated by  Tom 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #723105



    I want to remove the page-title on category-archive pages because I want to hook an individual archive-title/logo-template created with Elementor. „display:none“ is not an option because of SEO.
    Deactivating the title with Elements-layout doesn´t work.
    Here I found this solution: https://docs.generatepress.com/article/generate_show_title/ and customized it like this:

    add_action( 'after_setup_theme', 'remove_category_titles' );
    function remove_category_titles() {
    	if ( is_category( '' ) )
    		add_filter( 'generate_show_title', '__return_false' );

    But it doesn´t work. How it is possible to remove the archive-title?


    GeneratePress 2.1.4
    GP Premium 1.7.3

    David Customer Support

    Hi there,

    try the is_archive() the is_category( 'slug' ) is used for posts of set category.



    Hi David,

    thanks for your quick reply. In the meantime I found a solution.

    The filter generate_show_title unfortunately works only on pages and posts. It´s not working on archives.

    With this function it´s possible to remove the titles on all archive pages:

    add_action( 'after_setup_theme', 'remove_archive_titles' );
    function remove_archive_titles() {
    	add_filter( 'get_the_archive_title',
    		function ($title) {
        		return '';

    See here.

    But an empty <h1 class="page-title"></h1> still remains there.

    Another question:

    It´s possible to customize archives.php (inc -> structure) by uploading the file to the child-theme-directory? I tested it but nothing was changing.


    Tom Lead Developer

    Try this instead:

    remove_action( 'generate_archive_title', 'generate_archive_title' );

    It’s not possible to overwrite that file, as it’s not a regular template file. What changes are you wanting to make?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.