Support » Plugin: WooCommerce » How to Hide Related Products?

  • Resolved LordLiverpool


    Hello WooCommerce

    How do I hide related products?

    I’ve tried these two plugins:

    Neither worked.

    I then tried adding this code to functions.php of my child theme:

     * wc_remove_related_products
     * Clear the query arguments for related products so none show.
     * Add this code to your theme functions.php file.
    function wc_remove_related_products( $args ) {
     return array();
    add_filter('woocommerce_related_products_args','wc_remove_related_products',10 );

    But those pesky related products keep on showing up.

    I thought there would be a checkbox within WooCommerce itself to turn them off.

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • purbeckpixels


    This works for me, using WooCommerce version 3.0.4, Storefront (child) theme version 2.1.8:

    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );




    Thanks for replying.

    I tried your code but Related Products are still showing.



    I also tried some CSS

    .related.products {
    display: none !important;

    But they’re still showing!



    OK my bad

    After closer inspection they were related posts and not related products.

    This is a Jetpack Setting.

    To switch off related Products(Posts) simply go to:

    Jetpack > Traffic > Related Posts.

    Apologies in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to Hide Related Products?’ is closed to new replies.