Site logo

Archived topic

WooCommerce Product Categories

3 replies · Started by David on February 16, 2021

Viewing posts 1–4 of 4

Hi David,

Try this:

add_action( 'wp', function() {
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ( 1 !== $page ) {
        remove_action( 'generate_product_archive_title', 'generate_product_archive_title' );
        add_action( 'generate_product_archive_title', 'tu_custom_paged_product_archive_title' );
    };
}, 20 );

function tu_custom_paged_product_archive_title() {
    ?>
    <header class="page-header">
        <h1 class="page-title">
            <?php the_product_archive_title(); ?>
        </h1>
    </header>
    <?php
}

Yes, it works.

Great support!

No problem :)

This archived topic is closed to new replies.