How to insert PHP code in the WordPress widget

Advertisement

I finally found the solution that I’ve long wanted – to be able to insert PHP code into the widget. This is achieved by using Php-Code-Widget plugin. This plugin will create a new type of widget, called ‘Php code

To use it, add the widget, and paste your php code into it enclosed in <?php and ?> tags.  So no more hard coded php code in the theme now. Credit to the plugin’s author

Related Posts


Advertisement

Leave a Reply