-
AuthorPosts
-
May 1, 2014 at 11:24 pm #259104
Hi all,
Anybody any idea why this wont work in my enfold childtheme functions.php:
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
I think I need some code prior to this so it checks here first?
One more question, does the enfold childtheme functions.php need to be closed at the end with
?>
or explicitly not, I found that the childtheme kriesi posted is missing this php closure tag….Kind regards,
ThomasMay 2, 2014 at 2:36 am #259163Overrides in functions.php work fine for me.
You might try:
// remove related products
function wc_remove_related_products( $args ) {
return array();
}add_filter(‘woocommerce_related_products_args’,’wc_remove_related_products’, 10);
- This reply was modified 10 years, 6 months ago by cryscryb.
May 2, 2014 at 2:38 am #259164Found it here (there are some other suggestions on this page also that might be better):
http://wordpress.org/support/topic/remove-related-products-from-bottom-of-product-pages- This reply was modified 10 years, 6 months ago by cryscryb.
May 2, 2014 at 9:33 am #259247Hi!
Thank you for visiting the support forum!
@cryscryb: Thanks for helping out.
@borkent: You can use this on the child theme’s functions.php:remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);
Cheers!
IsmaelMay 2, 2014 at 9:54 am #259260Hi both,
Tried above and somehow its not working.
My childtheme functions.php is now:<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ add_theme_support('avia_template_builder_custom_css'); remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);
May 2, 2014 at 9:58 am #259265Somehow it seems that my childthemes functions.php doesnt work…
For the time being I css fixed it with:
.single-product div#av_section_1 { display: none; }
But ofcourse this is not a real solution here :).
May 3, 2014 at 4:03 am #259606Hey!
Try:
function avia_remove_func() { remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20); } add_action( 'init', 'avia_remove_func');
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.