New Landing How can we help? Themeforest Theme Support Neighborhood Remove Related Products

Viewing 15 posts - 1 through 15 (of 23 total)
  • #49712
    bruno
    Member
    Post count: 49

    Hi

    I would like to remove the Related Products section from the product page, because it slows down the load time.

    How can I do this?

    Thanks

    #50263
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please put this code functions.php at end of file at /wp-content/themes/neighborhood/
    remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 );

    With Best Regards
    Swiftideas Themes

    #55120
    sophiakc
    Member
    Post count: 29

    Hi,

    I edited the code you recommended but didn’t work… See enclosed screenshot.

    Sophia

    #55124
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Sophia,

    That’s not the end of the file, please remove that code there and scroll all the way down to the bottom.

    – Ed

    #55149
    sophiakc
    Member
    Post count: 29

    Ok thanks for your help 🙂
    I still did’nt work, see enclosed screenshot to tell me if it is the right place where I copy-paste the line ?

    #55153
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try another code now

    function wc_remove_related_products( $args ) {
    return array();
    }
    add_filter('woocommerce_related_products_args','wc_remove_related_products', 10); 

    Thanks

    #55157
    sophiakc
    Member
    Post count: 29

    I still have related product at the bottom of the product page… 🙁

    #55160
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Are you using any cache plugin ? may i have your login detail to check in detail ?
    Thanks

    #55165
    sophiakc
    Member
    Post count: 29
    This reply has been marked as private.
    #55166
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    HI,
    Please share also website admin URL too .
    Thanks

    #55167
    sophiakc
    Member
    Post count: 29
    This reply has been marked as private.
    #55170
    Mohammad – SUPPORT
    Moderator
    Post count: 27441
    This reply has been marked as private.
    #55174
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am still waiting your reply .
    Thanks

    #55178
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You did not put this code correctly with wrap of php tags [ <?php ?> ] as i see at your site top area . Please remove that one and add this one very soon . It will work 100% sure .

    <?php function wc_remove_related_products( $args ) { return array(); } add_filter(‘woocommerce_related_products_args’,'wc_remove_related_products’, 10);
    ?>

    Thanks

    #55202
    sophiakc
    Member
    Post count: 29

    oops… I copy-pasted it to replace the old one although I didn’t get it what I should exactly remove at first, because this phrase [ <?php ?> ] is seperated and not altogether.
    I got this error message then… 🙁
    And when I want to access the editor again it goes straight on to this message…

    Please show me the light 🙂

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register