• Hi,
    surfing in the web I found this useful snippet to show custom post types in the feed and in the homepage. But unfortunately when I publish a new custom post type it doesn’t update the feed and it update it only after I publish a normal post, and then I can see both the post both the custom post type I previously published.
    So what have I to edit in this script??

    add_filter( 'pre_get_posts', 'my_get_posts' );
    function my_get_posts( $query ) {
    
    	if ( ( is_home() && false == $query->query_vars['suppress_filters'] ) || is_feed() )
    		$query->set( 'post_type', array( 'post', 'custom_post') );
    
    	return $query;
    }

    Thanks all!

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

    (@albyzzolo)

    Could someone help me please?

    I have same problem.

    But, if you use FeedBurner, you can manually “refresh” your feed.
    Login to your FeedBurner account, then click “Edit Feed Details…” at the right top. You don’t have to do anything, just click “Save Feed Details”.

    Voila! Your custom post type feed now appear in the main feed!

    Wonder if this is WordPress bug??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Update (not show!) a feed after publish a custom post type’ is closed to new replies.