Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Trying to add a new feed with:

function events_feed() {
include(TEMPLATEPATH . '/events.php/');

And I'm getting a failed to open stream directory not found error. lives in the root of my theme folder.

2.I added the function to my functions.php file. Saved & uploaded.

3.Resaved permalinks.


share|improve this question

1 Answer 1

Remove the last / in

include(TEMPLATEPATH . '/events.php/');

If you cannot find a file, check with file_exists( $path ) first.

Also TEMPLATEPATH is deprecated now, use get_stylesheet_directory() instead.

And your feed is located at /gpevent', not/gpevents' as Stephen Harris noted.

share|improve this answer
Looks like a missing 's' from gpevent too – Stephen Harris Apr 19 '12 at 18:31
Oddly, it passes file_exists() but yet I still get a open stream directory not found error. The feed adress was merely a typo on my behalf. It all works fine locally. I'm baffled. – Justin W Hall Apr 20 '12 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.