Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

jokr on "Permalink for custom feed not found"

$
0
0

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?


Viewing all articles
Browse latest Browse all 8245

Trending Articles