Title: Compatible with &#039;advanced custom fields&#039;?
Last modified: August 21, 2016

---

# Compatible with 'advanced custom fields'?

 *  Resolved [TA003](https://wordpress.org/support/users/ta003/)
 * (@ta003)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/compatible-with-advanced-custom-fields/)
 * Hi,
 * Is it possible to import a custom field that is set in a widget block?
 * Any ideas?
    Thanks
 * [http://wordpress.org/plugins/wysiwyg-widgets/](http://wordpress.org/plugins/wysiwyg-widgets/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/compatible-with-advanced-custom-fields/#post-4329136)
 * Hi there,
 * You can use the Advanced Custom Fields plugin to add a custom field to the Widget
   Blocks. To show this post on (the public section / frontend) of your website 
   you will need some additional code though.
 * You can use the `ww_content` filter hook to add the value of this custom field
   to the widget content. Are you familiar with PHP and the way WordPress filters
   work? Your code would look something like this.
 *     ```
       function my_widget_block_content($content, $id) {
       	$field = get_field('my_custom_field', $id);
   
       	$content .= "\nField value: {$field}";
       	return $content;
       }
   
       add_filter('ww_content', 'my_widget_block_content', 10, 2);
       ```
   
 * Hope that helps!
 *  Thread Starter [TA003](https://wordpress.org/support/users/ta003/)
 * (@ta003)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/compatible-with-advanced-custom-fields/#post-4329208)
 * Great! Just what I needed!
    This saved me a lot of time!
 * Thanks!
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/compatible-with-advanced-custom-fields/#post-4329213)
 * Great, glad I could help!
 * PS. I would really appreciate it if you could[ leave a review on the plugin](http://wordpress.org/support/view/plugin-reviews/wysiwyg-widgets#postform),
   once you have a quick minute.
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Compatible with 'advanced custom fields'?’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/compatible-with-advanced-custom-fields/#post-4329213)
 * Status: resolved