Hi all,
In a plugin I would like to add a custom feed. I have done this as follows:
add_action( 'init' , array($this, 'init_function'));
public function init_function() {
add_feed( 'custom', array($this, 'get_custom_feed') );
}
public function get_custom_feed($comment) {
echo 'custom feed'
}
Now the following url is working as expected:
http://www.example.com/?feed=custom
But with permalinks it is not working: http://www.example.com/feed/custom
It works for existing feeds.
get_feed_link( 'custom' )
returns the permalink and there wordpress returns Page not found
.
Does anybody have an idea why?