Archived topic
Product category archive description duplicates
3 replies · Started by Sebastian on May 19, 2022
Hi,
The default product category archive description was only showing the excerpt for some reason so I created a custom one with a little help from the block element.
This is working perfectly, however the "old" description is also still showing up beneath, and that's obviously not what I want.
In my child theme's functions.php I have tried to remove the action for the standard description with the code below. I have also tried with different action hooks such as init, after_theme_setup but that didn't make any difference, the description excerpt is still showing.
function remove_woo_elements(){
remove_action( 'woocommerce_archive_description', 'action_woocommerce_archive_description', 10, 2 );
}
add_action('woocommerce_archive_description', 'remove_woo_elements');
Can someone please point me in the right direction?
Hi there,
try this snippet:
add_action( 'wp', function() {
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
}, 100 );
Damn you're good! Yes, that works perfectly! Love it, thank you David!
Glad to be of help :)