• Hi all,

    Currently having an issue where the feed on the main site has categories discluded, but the content in one of the categories that is discluded needs to have its own feed so I can output it somewhere else. Currently I have

    function exclude_category_feed($query) {
     if ($query->is_feed) {
       $query->set('cat','-2249,-1985,-2567');
     }
    return $query;
    }
    add_filter('pre_get_posts','exclude_category_feed');

    But I do need to get that category “2249”‘s feed, currently it outputs

    <rss xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/" version="2.0">
    <channel>
    <title>
    Simply Zesty ? Simply Viral – A Video of the Day, Every Day
    </title>
    <atom:link href="https://www.simplyzesty.com/category/viralvideos/feed/" rel="self" type="application/rss+xml"/>
    <link>https://www.simplyzesty.com</link>
    <description>Building your brand through social media</description>
    <lastBuildDate>Fri, 12 Aug 2011 16:29:25 +0000</lastBuildDate>
    <language>en</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>https://www.ads-software.com/?v=3.2.1</generator>
    </channel>
    </rss>

    Thanks!

    Sean

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Exclude Category from Main Feed, but keep Category Feed’ is closed to new replies.