Darshak Shah
Darshak Shah

Reputation: 159

How to apply wordpress shortcode in sidebar using fishpig extension in magento?

I've installed fishpig extension in magento for wordpress blog. But I'm not able to apply shortcode in sidebar. But its works in post.

Please help me on this situation.

Upvotes: 1

Views: 730

Answers (1)

Rabindra Nath
Rabindra Nath

Reputation: 361

Step 1. You need to add one line of code to your functions.php. You can also install a plugin, like Code Snippets, to add the line of code as a Snippet. Add this line of code (and the comment) at the end of your child theme’s functions.php and save. If you use Code Snippets, be sure to activate the code snippet after saving.

/* Allow shortcodes in widget areas */

add_filter('widget_text', 'do_shortcode');

Step 2. Next find the widget area you want to use. In your WordPress Dashboard, go to Appearance > Widgets.

Step 3. Add a Text Widget to your widget area, maybe your Sidebar. Yes, you’re going to add the shortcode to a Text Widget.

Step 4. Then add the shortcode and save.

Upvotes: 1

Related Questions