Posts tagged as:

posts

Execute PHP code in posts with WordPress Plugin

by John Ankarström on May 25, 2009

in Plugins

An example of PHP code in a pageYou can’t insert PHP code in posts or pages in WordPress from the start. Say you want a page listing all your categories or tags. This isn’t possible by standard. To do this, you will (of course) need a plugin.

The plugin’s name is Exec-PHP, and it allows you to use PHP in posts and pages, easily by writing the code in HTML editor. Notice that you can’t switch to the visual editor when editing posts with PHP code, otherwise the code will disappear.

With Exec-PHP you can also execute PHP code in the sidebar widgets. This is great, ’cause you can do more with PHP, than with the Blogroll widget. You can for example list only one link category etc.

I really recommend the WordPress Codex. You can find many tags and codes at the Template Tags part. The tags are used to call WordPress functions.

Download the plugin here, and as usual I would appreciate if you post a comment if you’ve tested it and liked it! ;-)

{ 0 comments }