Title: php output in wrong location
Last modified: March 2, 2019

---

# php output in wrong location

 *  Resolved [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-output-in-wrong-location/)
 * I have a php function that I have put inside my own plugin. The function has 
   several echo statements to display output.
 * I have put the shortcode for the function at the bottom of my page but quite 
   annoyingly when the page loads the output is at the top of the page instead of
   the bottom.
 * Can you help with this please?
 * Thanks

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

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-output-in-wrong-location/#post-11265578)
 * The shortcode handler should return the output, not echo it.
 * This is explained here: [Shortcode API](https://codex.wordpress.org/Shortcode_API)
 *  Thread Starter [supernova42](https://wordpress.org/support/users/supernova42/)
 * (@supernova42)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-output-in-wrong-location/#post-11266422)
 * Absolutely wonderful.
 * It’s easy, but I just couldn’t find it.
 * A thousand thanks….

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

The topic ‘php output in wrong location’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [supernova42](https://wordpress.org/support/users/supernova42/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/php-output-in-wrong-location/#post-11266422)
 * Status: resolved