Permalink for custom feed not found
-
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:
https://www.example.com/?feed=custom
But with permalinks it is not working:
https://www.example.com/feed/custom
It works for existing feeds.
get_feed_link( 'custom' )
returns the permalink and there wordpress returnsPage not found
.Does anybody have an idea why?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Permalink for custom feed not found’ is closed to new replies.