Using Beaver Themer with the WP Ultimate Recipe plugin

If you use Beaver Themer to display a singular recipe from the WP Ultimate Recipe plugin, the recipe box may not appear. Add this code (posted at https://www.wpultimaterecipe.com/docs/missing-recipe/) in your child theme’s functions.php to get the recipe box to appear:

function wpurp_recipe_content_loop_check( $ignore_query ) {
  if( is_main_query() ) $ignore_query = false;
	return $ignore_query;
}    
add_filter( 'wpurp_recipe_content_loop_check', 'wpurp_recipe_content_loop_check' );
2 Likes

I found out this snippet was messing with the recipe print template, so I added a condition:

if (strpos($_SERVER['REQUEST_URI'], "/print/") === false){
	add_filter( 'wpurp_recipe_content_loop_check', 'wpurp_recipe_content_loop_check' );
}