In version 5.2.0, we’ve added two new methods to display a recipe’s rating outside the recipe block.
This is possible using a new shortcode:
or using the new Recipe Rating block:
You can add the following PHP code to display the recipe rating in a custom location in your theme. For example, you can include this code in the single.php file of your theme to display the recipe rating at the beginning or end of a post:
The recipe rating shortcode supports the following attributes:
recipe_id – you can specify the ID of a specific Recipe Card custom post type. This can be used when displaying the shortcode outside a loop;
The ID of a recipe can be found in the URL when editing a recipe from the Recipe Cards section or in the shortcode: