I added some new improvements to the “Insert Script” WordPress plug-in.  You can now declare a JSON string and it will parse it out as $json_vals_arr, an array that gets passed directly to your external PHP script.

You can also declare “strings” instead of “vals” as a GET URL string like:  “strings=’variable1=value1&variable2=value2&etc=andSoOn'”.

To download the most recent version, type in “Insert Script” and select the plug-in author “Aaron Belchamber”.  To learn more, visit the official Insert Script WordPress Plug-in Page.  This is a simple and clean way for WordPress PHP developers looking to integrate external scripts and content within a WordPress page, post, or widget.


The “Insert Script” Simple WordPress Plug-in uses an “insert_script” shortcode to insert external scripts into WordPress content.

I developed a simple WordPress plug-in that allows WordPress owners to call and execute external scripts from within their web root folder. It can be HTML, Javascript, CSS, or even PHP that executes first. You can even pass different attributes to your scripts so when the script is inserted the properties and/or variables are defined beforehand, allowing the script, if it’s dynamic to process the data based on the attributes defined.

Creating a WordPress plug-in as a PHP class is always the best way to keep your code encapsulated while avoiding collisions with any other WordPress globals and other plug-ins. It’s a little more work than the old way of declaring a function, but it’s worth it. First of all, you aren’t joining the continuous accommodation of procedure monstrosities that the WordPress architecture seems to welcome despite the consequences that come with not using OOP encapsulation.  They should simply BAN procedural plug-ins and make all WordPress sites more stable overnight.

Insert Script WordPress Plugin Screenshot

To see a screenshot, view the help page and download the “Insert Script” WordPress plug-in, click here.

I found the need to bring in external content that could talk to legacy systems, pull information from another database, make API calls from another website, even pull in reports from a COBOL-based legacy monstrosity for a luxury jewelry retailer and show the results within a WordPress page as part of the dynamic content.  Need to show the price of gold at any given moment?  This plug-in bridges the gap between your WordPress, non-technical guru and your web developers.

Save a lot of time and trouble by separating concerns and allowing those laymen who are too lazy to learn real web programming to insert your heavy lifting with this simple but very powerful “Insert Script” WordPress plug-in.  If found this simple conduit between WordPress and other external scripts and code was efficient and safe for extending WordPress content to meet any organization’s or business’s needs.  I hope you do too!

– Aaron Belchamber


I recently ran into some issues with a heavily customized WordPress site.  Something was overriding something else somewhere, somehow...

The dreaded “find the problem then traverse back through the code” solution again raised its ugly head.  Oh, the futility, you time-sucking code bug.  Why didn’t the previous developer leave more DOCUMENTATION?!!!!!

Sometimes, you can at least speed up the “backtracing” involved by using more debugging tools that are available when the regular standby, WP_DEBUG constant doesn’t quite cut it for you.

To learn more, go the the Debug Bar WordPress page.  It helped, then when you resolve the problem, just deactivate the plug-in!

– Aaron Belchamber