Wordpress logo

Run php code in the wordpress post using Allow PHP in Posts and Pages Plugin

WordPress is the most popular blog system. You can customize your blog as you want. In addition you can also execute PHP code in posts and pages using the ‘Allow PHP in Posts and Pages‘ Plugin.

How to Install:

Automatically:

1. Goto admin panel.
2. Go to Plugins–>Add New from the sidebar menu.
3. Install Plugins page will be appear. Enter the ‘Allow PHP in Posts and Pages‘ in the search textbox and click on the ‘Search Plugins’
4. See the ‘Allow PHP in Posts and Pages’ in the searchered Plugins list and click on the ‘Install Now’.
5. After successfully installation, activate the Plugin.

Manually

1. Download from ‘Allow PHP in Posts and Pages
2. Extract the zip file and upload folder in the wp-content/plugins/ directory of your WordPress directory on the server.
3. Activate the Plugin from Plugins page.

How to use:

Use the [php] and [/php] shortcode tags to add the php code in your and pages. Like the following To add the PHP code to your post or page simply place any PHP code inside the shortcode tags as follows:

This is the test post

[php]
var $EnpName;
echo "Hello World";
[/php]

Allow php in wordpress post

Read More details: about how to use