Support » Plugin: WooCommerce » Shortcodes in Category Description

Viewing 1 replies (of 1 total)
  • so, you want to display a different slider for each category?

    Either way, you can do this using hooks

    add_action( 'woocommerce_product_archive_description', 'post_cat_slider_action', 30 );
    function post_cat_slider_action(){
    if(is_term( 'cat-slug-1', 'prod_cat' )) do_shortcode('[someshortcode]');
    if(is_term( 'cat-slug-2', 'prod_cat' )) do_shortcode('[someothershortcode]');
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcodes in Category Description’ is closed to new replies.