Support » Plugin: WooCommerce » Showing related products from same category

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.

    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 Author Mike Jolley

    (@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' );

    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 Author Mike Jolley

    (@mikejolley)

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

    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.