I have a text widget in the left sidebar and I want it to be displayed somewhere else on the page and not in a sidebar. The widget’s text is some HTML:
<a href...><img ...></a>
I can’t figure out the code how to get the widget’s content – the HTML. I found out, that the name of the widget seems to be “text-5” using this code:
print(wp_get_sidebars_widgets()['travelify_left_sidebar'][0]);
Why I use a widget for this is because I want it to be easy to alter the HTML code for my client.
thx in advance,
Koem
This template tag displays an arbitrary widget outside of a sidebar. It can be used anywhere in
Text widget
You can also find whole solution about wordpress codex site
http://codex.wordpress.org/Function_Reference/the_widget