DEV Community

Discussion on: Using Vue in WordPress

Collapse
 
workingwebsites profile image
Lisa Armstrong • Edited

Short codes are meant for pages and posts. Widgets are a different thing.

You can use short codes in widgets, but you have to tell Wordpress to parse them properly.

To get the short code to run in a TEXT widget, try adding the following code to the same file you set up your short code in:

add_filter('widget_text', 'do_shortcode');

More info: wpsites.net/wordpress-tips/enable-...

developer.wordpress.org/reference/...

codex.wordpress.org/Plugin_API