How to Include Functioning PHP Code in Your WordPress Posts
So you want to be able to use PHP in your WordPress blog posts and pages. That’s no problem. Just using <?php……..?> is going to make WordPress angry unless you install a plugin first. There are a few plugins out there that claim to offer this capability, but the one that I have found works the best is Exec-PHP.To begin using PHP code, follow these steps:
- Download Exec-PHP
- Install it like you would any plugin (The link above and readme file will walk you through this)
- If you are currently using it, you must turn off the WYSIWYG editor. To do this, go to Users -> Your Profile and uncheck the Use the visual editor when writing checkbox
- Start writing php code like you normally would: <?php ….code goes here ?>
That’s all there is to it!






















