Title: Any Limitations?
Last modified: August 20, 2016

---

# Any Limitations?

 *  Resolved [dorich](https://wordpress.org/support/users/dorich/)
 * (@dorich)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/any-limitations/)
 * I can’t get the widget to display the results of my php.
 * Being a neophyte I developed the php on the template to demonstrate that it worked
   correctly then copied it to the widget space. However, while it works on the 
   template/page the widget shows nothing.
 * My php is doing the following:
    Reading the ID and term of the current post, 
   then creating a new query to list other titles in the same term. In addition 
   it highlights the title of the current post in the list.
 * I’ve shown the plugin is working correctly by ehco’ing some text onto the page.
 * Are there likely to be any limitations on the php code that will work inside 
   the widget?
 * Thanks.
 * [http://wordpress.org/extend/plugins/php-code-widget/](http://wordpress.org/extend/plugins/php-code-widget/)

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

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [13 years, 2 months ago](https://wordpress.org/support/topic/any-limitations/#post-3426687)
 * The widget does not run code in the global scope. So any global variables that
   you’re using must be explicitly declared as global.
 *  Thread Starter [dorich](https://wordpress.org/support/users/dorich/)
 * (@dorich)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/any-limitations/#post-3426800)
 * That solved it.
 * Thanks for the help.

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

The topic ‘Any Limitations?’ is closed to new replies.

 * ![](https://ps.w.org/php-code-widget/assets/icon.svg?rev=992095)
 * [PHP Code Widget](https://wordpress.org/plugins/php-code-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-code-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-code-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/php-code-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-code-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-code-widget/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 2 replies
 * 2 participants
 * Last reply from: [dorich](https://wordpress.org/support/users/dorich/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/any-limitations/#post-3426800)
 * Status: resolved