Allow PHP in WordPress default text widget

Allow PHP in WordPress default text widget

The default text widget in WordPress only supports HTML. You can extend the functionality of the text widget by making it possible to execute PHP.

Put this code in the functions.php of the theme you are using:

Always backup your functions.php before changing it!

Ronald Heijnes

Since 2008 I have been busy with the functionality, management, maintenance and performance of self hosted WordPress. I like to share this knowledge!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz
Close Menu