[Resolved] Layout Element Not Working

Home Forums Support Layout Element Not Working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #833432
    David

    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?

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #833985
    Tom
    Lead Developer
    Lead Developer

    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?

    #834287
    David

    Thanks Tom, that snippet did the work.

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

    #834726
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.