Title: PHP-code?
Last modified: June 12, 2017

---

# PHP-code?

 *  Resolved [DS](https://wordpress.org/support/users/dosolnce/)
 * (@dosolnce)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-code-62/)
 * Your plugin is great, but I hurried to rejoice and rewrite my widgets. After 
   refreshing the page, PHP code does not work again, as if I saved it in a visual
   editor. Outwardly classic text widget looks like the old widget, but the php 
   code is not supported in it. Is there any solution to this issue? Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Victor Font](https://wordpress.org/support/users/vfontj/)
 * (@vfontj)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-code-62/#post-9220026)
 * The classic text widget _is_ the widget from WordPress 4.7.5 rewritten as a plugin.
   Nothing in the functionality changed from what it was in WordPress 4.7.5, so 
   no, it does not directly support executing PHP. The widget does support shortcodes
   however. If you want to execute PHP in this widget, add your code as a shortcode
   and it will run.
 *  Thread Starter [DS](https://wordpress.org/support/users/dosolnce/)
 * (@dosolnce)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-code-62/#post-9220425)
 * You are absolutely right. Sorry, I’m not a programmer at all, I do not understand
   php, so I did not immediately understand the reason. I have long connected the
   support of php-code in text widgets, and now I was sure that php in the widget
   will work as before. But I did not consider that now the widget is called otherwise.
   Now I solved the problem. I added to:
    `add_filter('widget_text', 'php_in_widgets',
   99);` one more: `add_filter('classic_widget_text', 'php_in_widgets', 99);` to
   the functions.php. Now everything works. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP-code?’ is closed to new replies.

 * ![](https://ps.w.org/classic-text-widget/assets/icon-256x256.png?rev=1676091)
 * [Classic Text Widget](https://wordpress.org/plugins/classic-text-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/classic-text-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/classic-text-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/classic-text-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/classic-text-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/classic-text-widget/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [DS](https://wordpress.org/support/users/dosolnce/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/php-code-62/#post-9220425)
 * Status: resolved