Insert PHP Code Snippet


A quicklook into Insert PHP Code Snippet

★ Convert PHP snippets to shortcodes
★ Insert PHP code easily using shortcode
★ Support for PHP snippet shortcodes in widgets
★ Dropdown menu in TinyMCE editor to pick snippet shortcodes easily

Features in Detail

Insert PHP Code Snippet allows you to create shortcodes corresponding to PHP code snippets. You can create a shortcode corresponding to any random PHP code such as ad codes, login validation etc. and use the same in your posts, pages or widgets.

The shortcodes generated using the plugin are easily available as a dropdown in the standard wordpress content editor as well as in widget settings, thereby giving you ease of integrating your PHP snippets with your posts and pages.


Insert PHP Code Snippet is developed and maintained by XYZScripts. For any support, you may contact us.

Insert PHP Code Snippet User Guide
Insert PHP Code Snippet FAQ

More Information

Insert PHP Code Snippet User Guide
Insert PHP Code Snippet FAQ


Please read the FAQ first if you are having problems.


WordPress 3.0+
PHP 5+


We would like to receive your feedback and suggestions. You may submit them at our support desk.


  • This is the shortcode generator page
  • This is page where you can manage all your snippets
  • The shortcodes are easily accessible in the content editor


Insert PHP Code Snippet User Guide
Insert PHP Code Snippet FAQ

  1. Extract to your /wp-content/plugins/ directory.
  2. In the admin panel under plugins activate Insert PHP Code Snippet.

If you need any further help, you may contact our support desk.


Insert PHP Code Snippet User Guide
Insert PHP Code Snippet FAQ

1. The Insert PHP Code Snippet is not working properly.

Please check the wordpress version you are using. Make sure it meets the minimum version recommended by us. Make sure all files of the insert php code snippet plugin uploaded to the folder wp-content/plugins/

2. I have 2 PHP shortcodes placed adjacently, but only one of them works.

Please use a whitespace to separate 2 shortcodes.

More questions ? Drop a mail and we shall get back to you with the answers.


27 กุมภาพันธ์ 2023
We've run into some functionality we want on a WP page within the template and in the past the WP developers coded the pages completely outside the template making it impossible for others with only WP edit access to modify those pages. This plugin resolved that as we can now use a shortcode to include that special PHP code and within an editable page in the template.That said, there are some commands which can render the editor unreachable causing a re-login loop. The bandaid is to identify the line of PHP code in the snippet which is causing the issue, remove it, perform page edits, then put the code back in the snippet. All said, still a far better solution than an entire page outside the site template.
26 กุมภาพันธ์ 2023
Useful plugin, it does the jobOnly a minor problem on php 8.0, a warning on the main admin page :Attempt to read property "ID" on null in .../wp-content/plugins/insert-php-code-snippet/xyz-functions.php on line 76Hope it'll be fixed soon.
20 กุมภาพันธ์ 2023 1 reply
Hello,Is there any plan to update the plugin soon?After updating my site to php 8 and latest version of WordPress, I am getting this error:PHP Parse error: Unclosed '{' on line 1 in /home/mysite/public_html/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(100) : eval()'d code on line 122Which is causing critical error to the site, I have temporary deactivated this plugin. Is it possible to provide any solution?Thanks
17 กุมภาพันธ์ 2023
Perfect plugin to automate small PHP code snippets to be added to a page or post.
Read all 607 reviews

Contributors & Developers

“Insert PHP Code Snippet” is open source software. The following people have contributed to this plugin.




  • Minor bugs fixed
  • Option to send exception report to email


  • Option to enable exception handling
  • Option to preview snippet
  • Database collation issue fixed
  • Minor bugs fixed


  • Notice errors fixed


  • Snippet selection support in classic editor block of Gutenberg
  • Support for Search Snippet by name
  • Navigation Improvements


  • Support for Bulk Actions(activate,deactivate,delete)


  • Added fix for output buffering issue


  • Removed deprecated widget initializing function


  • Option to enable auto insert of php opening tags added.


  • Automatic detection and correction of php opening and closing tags in snippet
  • Updated nonces and validations
  • Premium version details and comparison added


  • Nonces Added
  • A few bug fixes


  • Compatibility with wordpress 4.3
  • Added options to sort snippets in admin area by id and title
  • Removed redirection after snippet edit


  • Snippet chooser TinyMCE plugin modified
  • Compatibility with wordpress 3.9
  • A few bug fixes


  • First official launch