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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

1.events.php lives in the root of my theme folder.

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

3.Resaved permalinks.

4.Visited http://example.com/feed/gpevents

share|improve this question

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.