Viewing 6 replies - 1 through 6 (of 6 total)
  • In Woocommerce, On Product detail page, Under Related Product section, those products is listed which belong to current product category. I think woocommerce already provide this feature. If any product category is same as current product category then that product must be shown under Related Product on Product detail Page.

    Thread Starter Lubosh97

    (@lubosh97)

    Thank you for your reply but it dont works like you wrote. Seems like it generating related products based primary on tags not on categories. I need related products only from same category.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Related products are based on category and tag.

    Add this to theme functions.php to disable tag relation.

    add_filter( 'woocommerce_product_related_posts_relate_by_tag', '__return_false' );
    Thread Starter Lubosh97

    (@lubosh97)

    Thanks, it works ! Now i have only one small problem. On homepage i have placed on sale products via shortcode [sale_products per_page=”4″ orderby=”date”] and if I click on some sale product then on product page are related products from different categories. So it works for all products except products from on sale shortcode. Can you help me with this too ?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    It’s probably just cached and will fix once you save a product.

    Thread Starter Lubosh97

    (@lubosh97)

    I resaved these on sale products. WORKS, thank you very much ! Have a nice day

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Showing related products from same category’ is closed to new replies.