Shortcode in widget curiosity
-
I have defined a shortcode that will be used in a widget to add a pseudo-server-side include to that widget, and have enabled the shortcodes in widgets option in the functions file. When I do that, the translated shortcode always appears ABOVE the section containing the widget contents . For example, if my shortcode is [shortcode], and I place an ordinary text widget in the primary sidebar area with the content –
Contents contents Contents contents Contents contents Contents contents Contents contents.
[shortcode]then the shortcode’s code appears ABOVE the <section id=”text-##” class=”widget widget_text”> even though it is actually physically below that widget’s content!
Any ideas why that is, and ways that I can stop it?
The topic ‘Shortcode in widget curiosity’ is closed to new replies.