• Resolved scibuff

    (@scibuff)


    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 to https://mysite.com/feed/responce everything works fine.

    Now, I would like to add a query parameter to such a request … using the usual
    https://mysite.com/feed/responce/?param1=value1
    works just fine but I would like it to be
    https://mysite.com/feed/responce/param1/value1.

    basically I would like this to redirect to index.php?feed=responce&withcomments=1&param1=value1. I’ve looked into $wp_rewrite->rules and tried using

    'feed/responce/(.+)/(.+)' => 'index.php?feed=responce&withcomments=1&param1='.$wp_rewrite->preg_index(1)

    and many variations thereof but if I try to go to
    https://mysite.com/feed/responce/param1/value1
    it always redirects me to WP’s 404 page.

    Any help would be appreciated, thx

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom query for custom feed’ is closed to new replies.