Ok, so I figured out that you cannot use custom loops in rss template, you need to filter feed in pre_get_posts
.
You can pass any parameter to $query
object, for example:
feed_filter($query){ if( $query->is_feed && $query->is_main_query() ) { $query_args = array('relation' => 'OR', array('key' => 'votes','value' => '10','compare' => '>=','type' => 'NUMERIC', ), array('key' => 'author_role','value' => array('administrator', 'contributor', 'editor', 'author'),'compare' => 'IN', ) ); $query->set( 'meta_query', $query_args ); }}add_action( 'pre_get_posts', 'feed_filter' );