Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter CodeMonkeyBill

    (@codemonkeybill)

    Ahhh, yeah that was probably the issue. I had no idea logged in status would effect the feeds like that. The more I learn about how the feed system works internally the more it seems utterly bazaar.

    Many thanks for the quick responses and looking into it either way though!

    Thread Starter CodeMonkeyBill

    (@codemonkeybill)

    Thanks for the quick response! I was able to find a relatively easy fix, for this, but it does require altering the query for building the feed items. I’m still not really sure why the default feed query was including items with the post_status archive, but this (with some omitted extras specific to my needs) sorted it out.

    function custom_feed_filters($query)
     {
     // only for feeds
     if( $query->is_feed() )
      {
      $query->set( 'post_type', array( 'post', 'custom1', 'etc', ) );
      $query->set( 'post_status', array( 'publish' ) );
      }
     return $query;
     }
    add_action( "pre_get_posts", "custom_feed_filters" );

    In my situation I just used this function to change the entire feed query over to query the custom post type only, and explicitly defined the post_status, and that ended up solving several issues for me beyond the odd feed behavior relative to the inclusion of custom posts with the status archive…

Viewing 2 replies - 1 through 2 (of 2 total)