WordPress Plugins To Execute PHP code in WordPress Sidebar

IN WordPress

WordPress text widget lets you add any text including AdSense ads script in the sidebar, but it gets tricky when you have to execute a PHP code in the sidebar. By default WordPress doesn’t execute PHP codes in sidebar, and you need to add codes in theme file to execute it. If you are a coder or a programmer, you can easily do that but if you are non-tech user like me, you will find it hard to do. Here I’m sharing two plugins which will let you save PHP code in blog sidebar and execute it. This is useful when you want to run ads on specific category. Something which widget logic plugin does.

Add php code in WordPress Widget

2 WordPress PHP Widget plugin

PHP code Widget:

This is the first plugin which helps you to add PHP code in the sidebar. When you add the PHP code make sure it’s enclosed in in standard opening and closing tags. You can download the plugin from official page here.

PHP text widget

This is another plugin which let you run PHP codes in your blog sidebar. This plugin works similarly as above plugin and simply  activate the plugin, drag the widget and add your codes. You can download the plugin from here.

For now these two plugins will solve your purpose, in case if you know of any other plugin let me know via comments.

Subscribe on Youtube

Click to activate Offer & visit site Discount added automatically
No related entires

Subscribe to SML Newsletter

Receive Blogging Tips & Strategies

Get WordPress Guide eBook for free in the 2nd newsletter

100% privacy. we will never spam you

  • Author Bio

  • Latest Post

Blog post by Harsh Agrawal

Harsh has written 1051 articles.

Follow ShoutMeLoud on Twitter. Subscribe to ShoutMeLoud feed via RSS or EMAIL to receive instant updates.

Send Us Inquiry


  1. Scott says

    Hi Harsh

    Does this work with the current version of wp 2.9.2? If so, that would be great and I could use it asap.

    please let me know. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>