Jan Koester
Forum Replies Created
-
Forum: Plugins
In reply to: [RecipePress Reloaded] Frontend submissionFrontend submission is currently not supported and there are no plans to change this.
Forum: Plugins
In reply to: [RecipePress Reloaded] 404 image permalinksAlright, 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; } } }Forum: Plugins
In reply to: [RecipePress Reloaded] 404 image permalinksStill 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.
Forum: Plugins
In reply to: [RecipePress Reloaded] Error in rpr_core.php fileActually rpr_default should be set as default AND the code in line 602 should replace the option by ‘rpr_default’ in case the option string ist empty.
As I’m currently reworking the whole settings section I will take specila care of this. Thanks for reporting this issue.
Forum: Plugins
In reply to: [RecipePress Reloaded] 404 image permalinksI’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.
Forum: Plugins
In reply to: [RecipePress Reloaded] 404 image permalinksPlease 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; } }Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsThat’s great. I’ll release this fix tonight.
Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsI think I got it now. Please try a last toime replacing
query_recipesfunction 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() ){ // 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; } } }Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsAlready got it. That’s why you should replace the function once again.
Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsSure.
Just to explain it:The function
query_recipesmanipulates the wp_query to add recipes as post_type to the query so recipes can be displayed in category listings, on the front page, etc.
However this manipulation seems to throw out the portfolio post type. This shouldn’t happen though. I’ll now try to figure out how to avoid this. Therefore I will need the output of the two var_dump statements.Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsForgot to mention: Please remove the comment in line 39 again. Thanks.
Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsThanks for giving me access. However I still cannot clearly see the reason for the problem. And I cannot edit file which is probably causing all the problems from the backend.
Could you please to 2 things for me:
- Comment line 39
//add_action( 'pre_get_posts', array( $this, 'query_recipes' ) );in rpr_core.php, activate the plugin and see id the portfolio items are working. Recipes shouldn’t work then.
- Once again replace the function query_recipes by the following. I need to see how the query is changed.
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() ){ var_dump($query); // 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', 'rpr_recipe' ); } $query->set( 'post_type', $post_type ); var_dump($query); return; } } }
Thanks for your help!
Forum: Plugins
In reply to: [RecipePress Reloaded] Version .7 Breaks my portfolio itemsThere still was a nasty bug in the patch I posted above. If the following code helps, all is well.
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() ){ // 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', 'rpr_recipe' ); } $query->set( 'post_type', $post_type ); return; } }If not access to your dev system could indeed be helpful. Please send me a private mail to jan.koester@cbjck.de
Forum: Plugins
In reply to: [RecipePress Reloaded] A problem with accessing mysite.com/abc/recipesAs far as RecipePress reloaded is concerned there was another bug in the code I sent you preventing all pages from loading. Could you please replace the function query_recipes once more, this time by:
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() ){ // 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', 'rpr_recipe' ); } $query->set( 'post_type', $post_type ); return; } }On my development system this is now working as I expect it to work. If it works for you too I’ll release it as v0.7.1
Thanks for your patience and effort!
Forum: Plugins
In reply to: [RecipePress Reloaded] A problem with accessing mysite.com/abc/recipesPlease provide some more information on the type of pages not working. How did you create them, do they work with recipepress reloaded disabled?
- Comment line 39