Atom feed + excluding categories
-
Many thanks for this great plugin!
The following problem:
My site has English as primary language and German as secondary language.Using the following code I exclude categories from the feeds:
function exclude_category( $query ) { if ( $query->is_feed ) { $query->set('cat', '-206, -208, -214'); } return $query; } add_filter( 'pre_get_posts', 'exclude_category' );
This works for all feeds except the Atom feed of the secondary language.
Precisely:
- example.com/feed — works
- example.com/feed/atom — works
- example.com/de/feed — works
- example.com/de/feed/atom — fails
Because it works for the atom feed of the primary language, I assume it’s Polylang. I hope this is a simple thing that can be fixed quickly with one line of code.
Greetings,
Chris
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Atom feed + excluding categories’ is closed to new replies.