The shortcode does not work in the “TG: Product Slider” widget of the “eStore” theme. Shows only text [sc name="name" ]
Tell me friends, what should I do to make the shortcodes work?
Thank you my friends!
It seems the widget is not “executing” the shortcode. It is printing the shortcode as is.
Can you please check with “TG: Product slider” developer to “execute” shortcodes in their widget ?
This applies not only to shortcoder but any shortcode.
I solved this problem myself.
In the widget code, the place where the shortcode does not work is called like this: <div class="slider-content"><?php the_excerpt(); ?></div>
<div class="slider-content"><?php the_excerpt(); ?></div>
that’s why I added the line add_filter( 'the_excerpt', 'do_shortcode'); to functions.php and it worked!
add_filter( 'the_excerpt', 'do_shortcode');
Excellent ! do_shortcode is the one which executes the shortcode. Glad that you figured out on what to execute as per your theme.
Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter