Title: Adding PHP to widgets
Last modified: August 18, 2016

---

# Adding PHP to widgets

 *  [carmen101](https://wordpress.org/support/users/carmen101/)
 * (@carmen101)
 * [19 years ago](https://wordpress.org/support/topic/adding-php-to-widgets/)
 * I’ve downloaded a plugin that requires that to my template, I add the code <?
   if (function_exists(‘chicklet_creator’)) { chicklet_creator(); } ?>
 * I’d prefer not to add it to my template. Is there not a way to add this to a 
   widget and then just drag and drop the widget to where I want this code to appear.
 * I did try it but when I view my site, the plugin information did not display 
   anything on my website.
 * Thank you for your help.
 * Carmen

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

 *  Thread Starter [carmen101](https://wordpress.org/support/users/carmen101/)
 * (@carmen101)
 * [19 years ago](https://wordpress.org/support/topic/adding-php-to-widgets/#post-572728)
 * forgot to mention above, I added the above code to a text widget.
 *  [drmike](https://wordpress.org/support/users/drmike/)
 * (@drmike)
 * [19 years ago](https://wordpress.org/support/topic/adding-php-to-widgets/#post-572734)
 * Why not just write a widget for it?
 * [http://automattic.com/code/widgets/plugins/](http://automattic.com/code/widgets/plugins/)
 * Or fine a simple pre existing widget and modify it?
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [19 years ago](https://wordpress.org/support/topic/adding-php-to-widgets/#post-572735)
 * Otto’s phpexec widget is pretty easy to use:
    [http://ottodestruct.com/blog/2006/04/09/fun-with-widgets/](http://ottodestruct.com/blog/2006/04/09/fun-with-widgets/)
 * If you are using 2.2, make sure you get his widgets.php fix that is listed in
   the comments of the post I linked above.

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

The topic ‘Adding PHP to widgets’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/adding-php-to-widgets/#post-572735)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
