adding those codes into functions.php seems not to work:
add_filter( ‘term_description’, ‘shortcode_unautop’ );
add_filter( ‘term_description’, ‘do_shortcode’ );
remove_filter( ‘pre_term_description’, ‘wp_filter_kses’ )
or
add_filter( ‘product_cat_description’, ‘do_shortcode’ );
August 25, 2019 @ 9:38 am
Where did you get this code from?
They won’t do anything without creating functions – the add_filter function has 2 primary parameters:
1. The filter to hook into and run code against
2. The function to run – this function needs to exist in your codebase
For example, you have add_filter(‘product_cat_description’, ‘do_shortcode’);
This will do nothing since the do_shortcode function requires parameters. You’ll need to create another function to do what you’re looking for, pass that in, and then call do_shortcode with whatever parameters you’re trying to pass.