I have spent a lot of time on this now, hope for help.
I have Simple Popup Plugin, and I have used it in 2 different php widgets with the same error, so it’s got to be me and not the widget.
The following short code works beautifully in both php widgets and text widget:
[popup url=”/waxing/popupwax.html” width=”270″ height=”600″]<p style=”font-size:16px; font-style: italic”>Before and After Photos</p>[/popup]
I would very much like to use variables for url, width, height rather than hard coding it.
From docs it seems I should use do_shortcode() to do this.
echo do_shortcode(‘[popup url=”http://popupurl.com”]LINK TEXT[/popup]’);
The above isn’ even using variables, but always produces the following error:
Parse error: syntax error, unexpected T_STRING in /www/doc/www.beautysecrets.cz/www/wp-content/plugins/enhanced-text-widget/enhanced-text-widget.php(42) : eval()’d code on line 11
I have tried so many variations and always the same.
Thaks for your time,
- The topic ‘Outputting short code in widget’ is closed to new replies.