Getting started

How to display Recipe Rating stars anywhere on a page

The Recipe Rating shortcode and block currently work only when adding a recipe using the Recipe Block on a page. It doesn’t work with Elementor, but we’re currently working on a solution.

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:

[wpzoom_rcb_rating]

or using the new Recipe Rating block:


How to display the Recipe Rating in your theme using the template tag

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:


Shortcode Attributes

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;

Example:

[wpzoom_rcb_rating recipe_id="332"]

The ID of a recipe can be found in the URL when editing a recipe from the Recipe Cards section or in the shortcode:

Last updated on March 21, 2024
Have a suggestion?
This field is for validation purposes and should be left unchanged.