Custom query for custom feed
-
Hey guys,
so I’ve created a new feed (named it “responce”) which is basically rss feed. I’ve added it using
add_feed('responce', 'my_fuction');and when I go tohttp://mysite.com/feed/responceeverything works fine.Now, I would like to add a query parameter to such a request … using the usual
http://mysite.com/feed/responce/?param1=value1
works just fine but I would like it to be
http://mysite.com/feed/responce/param1/value1.basically I would like this to redirect to
index.php?feed=responce&withcomments=1¶m1=value1. I’ve looked into$wp_rewrite->rulesand tried using'feed/responce/(.+)/(.+)' => 'index.php?feed=responce&withcomments=1¶m1='.$wp_rewrite->preg_index(1)and many variations thereof but if I try to go to
http://mysite.com/feed/responce/param1/value1
it always redirects me to WP’s 404 page.Any help would be appreciated, thx
The topic ‘Custom query for custom feed’ is closed to new replies.