Support » Fixing WordPress » how to exclude a specific page from rss?

  • I’m using the BX Page RSS plugin to add my pages into my RSS feed. The code to this plugin is very simple, and I include it below in case it helps.

    What I want to know is how could exclude a specific page from being included in the RSS feed?

    There are plugins out there to exclude specific posts from the feed, but since including pages isn’t default behavior, I’m not finding anything to do this.

    Any ideas?

    Here’s the code to that plugin:

    <?php
    
    function isl_page_rss($query) {
      if ($query->is_feed) {
        $query->set('post_type', 'any');
      }
      return $query;
    }
    
    add_filter('pre_get_posts', 'isl_page_rss');
    ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to exclude a specific page from rss?’ is closed to new replies.