Generate another feed URL via Rewrite
-
Hi,
I want to exclude a category from the standard feed, and at the same time provide two additional feeds, one for the excluded category and one for everything. Permalinks are activated.
The former two are easy, I filter pre_get_posts and exclude the specified category, if is_feed() and !is_category(ID) is true. However, how do I add an additional feed, something like https://domain.tld/feed/all that includes everything? I’m not that experienced with WordPress’ internal rewrite system. I assume I have to add an additional rule and check for some parameter at the pre_get_posts filter to include the specified category…
To sum it up:
https://domain.tld/feed – Standard feed without specified category
https://domain.tld/category/feed – Standard feed for specified category
https://domain.tld/feed/all – Additional feed with everything.Thanks in advance!
Greets, Jeriko
- The topic ‘Generate another feed URL via Rewrite’ is closed to new replies.