Site logo

Archived topic

Layout Element Not Working

3 replies · Started by David on March 8, 2019

Viewing posts 1–4 of 4

Hello,

I created a Layout Element to disable the Page Title on a particular Product Category Archive but it didnt work at all.

I tried to change the Display Rules to allow this same Layout to disable the secondary nav as well and sitewide just to test things out, but as it turns out, the layout didn't disable anything in any page.

Is there something Im missing to make it work?

Hi there,

The Layout Element doesn't know how to remove WooCommerce titles right now.

However, you can do this:

add_filter( 'woocommerce_show_page_title', function( $title ) {
    if ( is_product_category( 'your-category' ) ) {
        return false;
    }

    return $title;
} );

The Layout Element should definitely work for the secondary nav. Can you take a screenshot of the Disable Elements and Display Rules areas?

Thanks Tom, that snippet did the work.

Nevermind about the Layout problem, I was confusing the secondary navigation with the top bar.

Glad I could help :)

This archived topic is closed to new replies.