Title: Php Code
Last modified: August 31, 2016

---

# Php Code

 *  Resolved [tubella](https://wordpress.org/support/users/tubella/)
 * (@tubella)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-code-53/)
 * Can PHP code be executed in a box?
    i tried to run PHP to display random post
   in a box to trigger readers read more posts. But the code didn’t work. (it works
   in a widget sidebar though).
 * Thanks.
 * [https://wordpress.org/plugins/dreamgrow-scroll-triggered-box/](https://wordpress.org/plugins/dreamgrow-scroll-triggered-box/)

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

 *  Plugin Author [Eero Hermlin](https://wordpress.org/support/users/eero-hermlin/)
 * (@eero-hermlin)
 * [10 years ago](https://wordpress.org/support/topic/php-code-53/#post-7218185)
 * Hi
 * That should be achieved by using either Shortcode or Widget. For example install
   some plugin what allows showing random post as Widget and in Appearance->Widgets
   apply it to “Scrollbox / Dreamgrow scroll triggered box” Widget area.
 * If you don’t find any suitable plugin for your exact purpose, then I suggest 
   to create your own plugin what implements Shortcode or Widget. That’s the correct
   way of executing custom PHP and otherwise you paint yourself into the corner.
 *  Plugin Author [Eero Hermlin](https://wordpress.org/support/users/eero-hermlin/)
 * (@eero-hermlin)
 * [10 years ago](https://wordpress.org/support/topic/php-code-53/#post-7218188)
 * As a conclusion: in this question Shortcode or Widget is right way to go.

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

The topic ‘Php Code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dreamgrow-scroll-triggered-box_99ae8b.
   svg)
 * [Scroll Triggered Box](https://wordpress.org/plugins/dreamgrow-scroll-triggered-box/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dreamgrow-scroll-triggered-box/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dreamgrow-scroll-triggered-box/)
 * [Active Topics](https://wordpress.org/support/plugin/dreamgrow-scroll-triggered-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dreamgrow-scroll-triggered-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dreamgrow-scroll-triggered-box/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Eero Hermlin](https://wordpress.org/support/users/eero-hermlin/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/php-code-53/#post-7218188)
 * Status: resolved