How To Run PHP Code In Post, Page And Sidebars Widget via Plugins


I remember some months ago i was trying to execute PHP code within a blog post i was crafting. i later abandoned the writing of the article as i couldn’t find a way to run the PHP codes.
Am going to share some plugins to help execute and process PHP codes within WordPress post, pages, and Widget sidebars.
Had it been i knew of these plugins as at that time, that abandoned post would have been published.

  1. Daiko’s Text Widget

    This plugin adds a text widget that is capable of displaying and executing PHP codes. Conditional tags are included in this plugin to specify where the php code will display.
    To use, install and activate it, drag the Daiko’s Text Widget to your sidebar and add your own content including php code if needed. Optionally specify whether to display only on home, pages, posts, posts in category(-ies) or category archives. Specify even more if you like with slug/ID/title.

  2. PHP Code Widget

    The normal Text widget allows you to insert arbitrary Text and/or HTML code. This allows that too, but also parses any inserted PHP code and executes it. This makes it easier to migrate to a widget-based theme.
    All PHP code must be enclosed in the standard tags for it to be recognized.

  3. Exec-PHP

    The Exec-PHP plugin executes PHP code in posts, pages and text widgets. it has great configurable features such as: Restrict execution of PHP code in posts and pages to certain users by using roles and capabilities; Information about which users are allowed to execute PHP with the current security settings; Executes PHP code in the excerpt and the content portion of your posts and pages; Works in your newsfeeds.
    Visit bluesome.net for plugin documentation/

  4. Shortcode Exec PHP

    Using this plugin you can execute arbitrary PHP code using shortcodes in your posts, pages, comments, widgets and RSS feeds, just like manually defined shortcodes. The shortcodes and associated PHP code are defined using the settings of this plugin. It is possible to parse and use shortcode parameters and to use shortcode content. Defined shortcodes can be deleted and disabled.

  5. WP exec PHP

    This plugin executes PHP inside posts, pages and text widgets. Add filters and actions using custom fields. Use <?php .... ?> to execute PHP.



Don’t Want To Miss Our Update, Subscribe Now
About collizo4sky

Agbonghama Collins is a webdeveloper and an internet geek. I love writing and sharing the little idea & information i know. Hope you enjoyed my Article.

You can get in touch with him via these modes: Follow him on Twitter, add him on Facebook or on Google+