CMS Development Wordpress

How to add shortcode to html widget

I’m trying to include a shortcode to an html widget by adding to functions.php add_filter( ‘widget_text’, ‘shortcode_unautop’); add_filter( ‘widget_text’, ‘do_shortcode’);

and to the html widget alert(“‘” + [user_email] + “‘”);

but it keeps saying user_email is not defined.

Leave a Reply

Your email address will not be published. Required fields are marked *