Alright, now I understood the problem. Below you can find the function query_recipes() that solves this issue. It will be in the next release.
function query_recipes($query) {
// Don't change query on admin page
if (is_admin()){
return;
}
if ( ! is_admin() && $query->is_main_query() ) {
// Post archive page:
if ( is_post_type_archive( 'rpr_recipe' ) ) {
//set post type to only recipes
$query->set('post_type', 'rpr_recipe' );
return;
}
// All other pages:
if( !is_page() && ! is_attachment() ){
// add post type to query
$post_type = $query->get('post_type');
if( is_array( $post_type ) && ! array_key_exists( 'rpr_recipe', $post_type ) ){
$post_type[] = 'rpr_recipe';
} else {
$post_type = array( 'post', $post_type, 'rpr_recipe' );
}
$query->set( 'post_type', $post_type );
return;
}
}
}