Title: Access specific Widgets Blocks Content through PHP
Last modified: August 30, 2016

---

# Access specific Widgets Blocks Content through PHP

 *  [endlessloving](https://wordpress.org/support/users/sebastians/)
 * (@sebastians)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/access-specific-widgets-blocks-content-through-php/)
 * Hi Danny,
 * I love this plugin – so useful!
 * I am trying to build a nice little interface for my client where she can choose
   different widgets to be shown in the sidebar of pages. I want to create some 
   widget blocks and offer those contents to be chosen and a page by page basis.
   For that I would like to use php in my theme to access the widget blocks content.
   
   Is there any way to do that? I could use a php function that I just feed with
   an ID of the widget and it displays the title and content. Could you provide 
   such code?
 * The most common way to access widgets is this:
    `the_widget('My_Custom_Widget');`
 * Could this work with Widget Blocks as well?
    The problem is that it is not really
   just one widget but a kinda custom post type, right?

The topic ‘Access specific Widgets Blocks Content through PHP’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wysiwyg-widgets_94bdc6.svg)
 * [Widget Content Blocks](https://wordpress.org/plugins/wysiwyg-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wysiwyg-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wysiwyg-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/wysiwyg-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wysiwyg-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wysiwyg-widgets/reviews/)

## Tags

 * [custom widgets](https://wordpress.org/support/topic-tag/custom-widgets/)
 * [php function](https://wordpress.org/support/topic-tag/php-function/)
 * [widget text](https://wordpress.org/support/topic-tag/widget-text/)

 * 0 replies
 * 1 participant
 * Last reply from: [endlessloving](https://wordpress.org/support/users/sebastians/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/access-specific-widgets-blocks-content-through-php/)
 * Status: not resolved