WP Plugin Review - Insert PHP

This WordPress plugin allows you to take some page content that includes PHP tags and to plug it straight into a post or page in WordPress with minimal changes. In fact the only change needed is to replace the actual PHP tags themselves with a special code that the plugin recognises in order for the plugin to insert the PHP into the page for you correctly.

All that you need to do is to replace <?php with [insert_php] and ?> with [/insert_php] in each spot in the page where those tags appear in order for the plugin to effectively insert the content of the PHP into that spot in the page.

The only complication to this is that the code you are inserting needs to be able to work properly when inserted into a WordPress page and to not clash with the PHP of WordPress itself. Having the PHP code reference includes could be a problem as the files to be included will not be in the same location as they would be if you weren't using WordPress. You will also not be able to rely on WordPress to upload them. You might be able to get it to work if you FTP them to the appropriate folder in WordPress and reference them from there but if they only contain a few lines of code it might be easier to simply include that code directly into each page that needs it. With the first use I made of this plugin the page needed to read a series of links from a database (not the one that WordPress was in) so I simply added the code to connect to the database to the top of the PHP to be inserted in place of the call to the include that I would normally have used to do the connect.

Where this plugin works it is extremely simple to implement PHP in the page. I have heard of people not being able to get this plugin to work but presumably that's because the PHP they are using is incompatible with WordPress in some way or they have failed to modify the PHP correctly to work with WordPress. For anyone properly familiar with PHP this shouldn't be an issue as it shouldn't be too difficult to figure out and fix any problems.

go to top

FaceBook Follow
Twitter Follow
Donate