PHP/Wordpress - How to display specific widget

admin

Administrator
Staff member
I was searching and i found this: <a href="https://codex.wordpress.org/Function_Reference/the_widget" rel="nofollow">https://codex.wordpress.org/Function_Reference/the_widget</a>

Based on this i have tried several things, one of them:

Code:
&lt;?php the_widget( 'Phone'); ?&gt;

It is a text widget, created in the sidebar. I was hoping with this code to get the content of widget i created with title
Code:
Phone
but however nothing is appearing. I can not display the content of the widget i created.

So my questions is, can you give an example how can i display the content of widget with widget title for example
Code:
Phone
?

Thanks in advance!