• 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)
  • Thread Starter Christian Hockenberger

    (@chrisbergr)

    Shame on me.

    Although I pressed “Clear cache” before deactivating the other plugins, obviously not everything was thrown out of the cache. I find this rather stupid, but it turns out that the problem described has nothing to do with Polylang.

    Sorry and keep up the good work.

    Chris

Viewing 1 replies (of 1 total)
  • The topic ‘Atom feed + excluding categories’ is closed to new replies.