Title: Api Example not working
Last modified: July 9, 2018

---

# Api Example not working

 *  Resolved [sdesigns](https://wordpress.org/support/users/sdesigns/)
 * (@sdesigns)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/api-example-not-working/)
 * I have tried the code on [https://gist.github.com/ajaydsouza/c8defd4b46e53240e376#file-tptn-api-examples-php](https://gist.github.com/ajaydsouza/c8defd4b46e53240e376#file-tptn-api-examples-php)
   withing a templete for a page and if I do not put a ?> at the end i get an error
   but when i do add the ?> at the end the page is blank with the exception of my
   header and footer. Is there something that I am missing?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fapi-example-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/api-example-not-working/#post-10496466)
 * Can you post the exact code you’re using? The `?>` shouldn’t make a difference.
 * What is the error you say appears?

Viewing 1 replies (of 1 total)

The topic ‘Api Example not working’ is closed to new replies.

 * ![](https://ps.w.org/top-10/assets/icon-256x256.png?rev=2986432)
 * [WebberZone Top 10 — Popular Posts](https://wordpress.org/plugins/top-10/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-10/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-10/)
 * [Active Topics](https://wordpress.org/support/plugin/top-10/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-10/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-10/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/api-example-not-working/#post-10496466)
 * Status: resolved