• Resolved wordpressnetwork

    (@wordpressnetwork)


    Hi team,

    I am using GeneratePress as a theme and want to use the design I made also on WooCommerce product category archive pages. The problem that arises is that the products get shown twice: once through the theme’s block in the correct design and then again in the WooCommerce standard design from the standard loop.

    Is there a way to suppress the original loop? I got this CSS but this does just give a solution for the optical problem, I guess the products are still there a second time, which is not good for SEO:

    .archive.woocommerce .site { display: none; }

    Thanks a lot!

    Stephan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @wordpressnetwork,

    If you set this page as a shop page in WooCommerce > Settings > Products, then WooCommerce will automatically add the shop loop to show products on this page.

    However, you can remove the shop page from that setting to accomplish your goal. And to change the return to shop url to match that with this snippet:

    function return_to_static_shop_page() {
        return 'https://yourdomain.com/your-page/';
    }
    add_filter( 'woocommerce_return_to_shop_redirect', 'return_to_static_shop_page' );

    More info: https://generatepress.com/forums/topic/how-to-disable-product-loop-on-shop-page/

    I hope this helps! Please let us know how it goes or if you need further assistance.

    Thread Starter wordpressnetwork

    (@wordpressnetwork)

    Hi Shameem,

    thanks for your answer.

    Yes, that works for the main shop page. But I have the problem on the product archive pages. Is it possible to deactivate the loop on those too?

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello wordpressnetwork

    Thank you for your reply and for clarification.

    I understand you have created a custom Product Archive template on your site and the products are appearing twice.

    Please note that WooCommerce does not automatically add a loop to the product archive template as it does for the Shop page.

    Since your template has a custom code, it is out of the scope of our Support Policy. But if you can share a screenshot of your product archive template code, I will be happy to guide you in the correct direction.

    You may also contact GeneratePress support for assistance.
    They will be better equipped to resolve your issue.

    I look forward to your reponse. ??

    Thread Starter wordpressnetwork

    (@wordpressnetwork)

    Hello Zubair,

    I understand. I will do that and figure it out.

    Thanks for your time!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide products from WooCommerce Product Archive Page’ is closed to new replies.