• In my category settings, display type is set to both.

    When I’m browsing category archive page, both category and products are showing in the loop.

    What I want, is to separate categories from the loop and show it in a different section. In the loop, I want to display only products.

    I have used woocommerce_product_subcategories() to achieve the save before. But after updating to latest version, this seems not working anymore.

    I have posted the problem in wordpress.stackexchange too. See here [detail question] for better explanation to my problem.

    Any help is appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    I’m not quite sure why you’re using custom code for that; WooCommerce has settings under Appearance > Customize > WooCommerce > Product Catalog that affects what shows up on that page. Here’s a screenshot illustrate that better:


    Link to image: http://cld.wthms.co/6yEi2o

    Maybe I’m just missing something obvious here?

    I wanted to separate categories and products into different section of the page. Not in same loop.

    I have already found the solution. I have found how, WC is actually rendering categories before products. They are using the action woocommerce_before_shop_loop to render categories. in the loop. So, if I use the following code, I can choose not to show categories in the loop.

    remove_filter( 'woocommerce_product_loop_start', 'woocommerce_maybe_show_product_subcategories' );

    Plugin Author Julia Amosova

    (@jamosova)

    Hi @smarif,

    Glad to hear you found the solution, thanks for sharing!

    Looks like you are all set for now so I am going to mark this thread as Resolved. Feel free to connect with us again should you have any additional questions!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Separate Categories from WC Product loop when display type is set to both on the’ is closed to new replies.