• Rebel Republik

    (@meszarovits)


    Hello,

    I used some years ago your theme and I go back with because is so good and fast!

    So I have a little problem with class=”entry-header” aria-label=”Content” on all my folder [ redundant link removed ]

    Instead to put me the title of the page, I have the repetition of the same title on every pages. I mean instead to have:
    <header class=”entry-header” aria-label=”Content”>
    <h1 class=”entry-title” itemprop=”headline”>Caution police state</h1></header>
    I have
    <header class=”entry-header” aria-label=”Content”>
    <h1 class=”entry-title” itemprop=”headline”>The design collection</h1></header>

    So I have the same H1 with “The design collection” on every pages of the folder /product/ making me duplicate with the H1 tag.

    I would like to delete this tag from all pages of the folder /product/

    In advance thanks for your help,
    Manuel

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • David

    (@diggeddy)

    Hi there,

    Edit the page that has been set to display your shop, and use the Disable Content Title option:

    https://docs.generatepress.com/article/disable-elements-overview/

    Thread Starter Rebel Republik

    (@meszarovits)

    Hello David,
    thanks for your quick reply!
    But is it working with the free version?
    Thanks,
    Manuel

    ying

    (@yingscarlett)

    Hi Manuel,

    The disable title option is available in free theme.

    You can find it in the page editor’s layout metabox.

    Thread Starter Rebel Republik

    (@meszarovits)

    Hello Ying,
    Thanks for your quick reply.
    But not on the layout metabox, I have only:
    Disable Elements: Content Title

    I need the disable element: Header.
    He doesn’t appear.
    I think is only with the premium version.
    Is the shame because is making me duplicate title on every pages….

    ying

    (@yingscarlett)

    Have you tried the disable content title option?

    It doesn’t work?

    Thread Starter Rebel Republik

    (@meszarovits)

    Thanks for your reply Ying!
    yes I tried the disable content title option it but doesn’t work!
    Do you know in which file is this command? I will delete over there.
    Manuel

    Thread Starter Rebel Republik

    (@meszarovits)

    At the moment I found this solution.
    From the file content-page.PHP I removed this part of code:

    <header <?php generate_do_attr( 'entry-header' ); ?>>
    				<?php
    				/**
    				 * generate_before_page_title hook.
    				 *
    				 * @since 2.4
    				 */
    				do_action( 'generate_before_page_title' );
    
    				if ( generate_show_title() ) {
    					$params = generate_get_the_title_parameters();
    
    					the_title( $params['before'], $params['after'] );
    				}
    
    				/**
    				 * generate_after_page_title hook.
    				 *
    				 * @since 2.4
    				 */
    				do_action( 'generate_after_page_title' );
    				?>
    			</header>

    But it removed me also on my forth principal pages that is not good.

    So if you have better solution?
    Thanks,
    Manuel

    David

    (@diggeddy)

    You don’t want to edit the Theme files, aside from that problem, this changes will be lost when the theme is updated.

    Try adding this PHP Snippet:

    add_action( 'wp', 'db_remove_page_title' );
    function db_remove_page_title() {
        if ( is_page( 99 ) ) {
            add_filter( 'generate_show_title', '__return_false' );
        }
    }

    You need to change the 99 to that Pages ID.

    And this doc explains how to add the code:

    https://docs.generatepress.com/article/adding-php/

    Thread Starter Rebel Republik

    (@meszarovits)

    Thank you again for your quick reply David!
    I prefer to add my code on the function.php on your theme and is very quick to change the day of the update than to add a list of a code with every number pages.
    But I will renew soon your theme.
    So no big problem.
    Thank you so much for your help and your reactivity.
    Warm regards,
    Manuel

    David

    (@diggeddy)

    If you want to remove it from all pages then just do:

    add_action( 'wp', 'db_remove_page_title' );
    function db_remove_page_title() {
        if ( is_page() ) {
            add_filter( 'generate_show_title', '__return_false' );
        }
    }

    Or you can remove it from the entire site:

    add_action( 'wp', 'db_remove_page_title' );
    function db_remove_page_title() {
        add_filter( 'generate_show_title', '__return_false' );
    }

    Glad to be of help

    Thread Starter Rebel Republik

    (@meszarovits)

    Thanks David!
    I will try!

    David

    (@diggeddy)

    You’re welcome

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘header class=”entry-header” aria-label=”Content”’ is closed to new replies.