Please try inserting the following code in rpr_core.php line 200
// Querying specific page (not set as home/posts page) or attachment
if(!$query->is_home()) {
if($query->get('page_id') !== 0 || $query->get('pagename') !== '' || $query->get('attachment_id') !== 0) {
return;
}
}
I’m sorry I can’t reproduce this faulty behaviour on my testing system. Please provide some more information on your setup, permalink structure and versions.
permalinks structure: http://thestandardblog.com/2014/10/sample-post/
wordpress version: 4.0
RP: Version 0.7.2
Still can’t reproduce the error you seem to get. Embedding images in recipes and posts works perfectly for me. Also linking those to the original file for a lightbox works.
Embedding images works fine. The lightboxes work fine. It’s just went I go to the attachment permalink page, I get a 404. All of the images are still showing up fine though.
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;
}
}
}
thank you.
What file is the function query_recipes($query) in?
Found it. That fixed it. Thank you!