How to add PHP scripts to WordPress posts and pages!

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • Email
  • RSS
  • Digg
  • Google Plus

Including a PHP script in your WordPress Post or a Page as compared to in Sidebar Widget is possible. All you need to do is install a wordpress plugin which makes execution of PHP possible. In my case I installed a plugin called PHP Execution. I can now include any PHP script within a post or page. I was able to install a small PHP script in the Header.php which displays current time and date at the top of the template. Here is how you can implement it. Goto Header.php and insert this small PHP code:

<?php
print strftime(‘%c’);
?>

NOTE: Installing this plugin (and any other PHP execution plugin) is an open invitation to hackers as they can post scripts as comments. Please know what you are doing before installing.

houston texans tickets

indianapolis colts tickets

jacksonville jaguars tickets

Share and Enjoy

Leave a Reply

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


6 − = three

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=""> <strike> <strong>