Title: require_once doesn&#8217;t work
Last modified: August 19, 2016

---

# require_once doesn’t work

 *  [jgas](https://wordpress.org/support/users/jgas/)
 * (@jgas)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/require_once-doesnt-work/)
 * hi to this big community!
 * i have a problem, can you help me?
 * inside a template (sidebar.php in my case) when i try to add:
 * `<?php require_once('whatever');`
 * and i refresh my page, i can’t see anything after the point where i’ve added 
   the code require once.
    For example, if i add it before the footer, i can’t see
   the footer. If i add it in the <head> i can’t see the whole page!
 * i need it to require simplepie for this blogroll: [http://net.tutsplus.com/javascript-ajax/building-a-better-blogroll-dynamic-fun-with-simplepie-and-jquery/](http://net.tutsplus.com/javascript-ajax/building-a-better-blogroll-dynamic-fun-with-simplepie-and-jquery/)
 * If you want to give a look to the page i’m tring to code, please visit [http://www.cinenotizie.net](http://www.cinenotizie.net)
 * Thank you!

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

 *  [dor](https://wordpress.org/support/users/dor/)
 * (@dor)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/require_once-doesnt-work/#post-1168001)
 * Try to specify full path.
 *  [Scoe](https://wordpress.org/support/users/scoe/)
 * (@scoe)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/require_once-doesnt-work/#post-1168367)
 * I had this problem. WordPress doesnt seem to like require_once commands, instead,
   use the include command.
 * `include(TEMPLATEPATH.'/whatever.php');`
 * If you have white space after this, try taking out the <?php tag from the included
   file to see whether it gets entered as text or not. If it does, then the problem
   lies in the included file, not the include statement.

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

The topic ‘require_once doesn’t work’ is closed to new replies.

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [Scoe](https://wordpress.org/support/users/scoe/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/require_once-doesnt-work/#post-1168367)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
