Friday, April 20, 2012

Executing PHP codes in WordPress Page/Post

Everyone want to write php code in wordpress as his mine. But wordpress support only its won code definitions. I wan to coded php in wordpress cms as like this code in a post and it should be work. but how......
[php]
<?php
echo "The year is: ";
echo date('Y');
?>
[/php]

There is a solution and I am giving you a plugin that you can write your php code as your mine.

For this you should follows the instructions-

Installation:
Download phpexec.zip
Unzip the file
Upload to /wp-content/plugins/ directory
Activate the plug-in from WordPress administration menu

Usage:
Anywhere in your post/pages where you want to execute a PHP Codes, insert before your php codes and your php codes.
view plaincopy to clipboardprint?
[php]
<ecoder>
<?php
echo "Current date and time: ";
echo date('Y');
?>
</ecode>
[/php]
If you are running a blog with multiple users, you need to determine who can run this plug-in. Alter the settings in your Administration Menu. Options -> eCoder

2 comments:

  1. It so cool you took time to write this article i bet i took a lot o research and time so thank you so much to make it easier to me

    ReplyDelete
  2. I simply want to tell you that I am all new to blogs and really enjoyed you're blog site. Very likely I’m planning to bookmark your site . You certainly come with good writings. Cheers for sharing with us your webpage.

    ReplyDelete

Note: Only a member of this blog may post a comment.