Hello,
Thank you for reaching out about connecting your custom post Recipe fields to Rank Math Recipe Schema. Unfortunately, Rank Math does not offer a direct integration to automatically fill the Recipe Schema fields with custom post data.
You would need to manually input the information into Rank Math’s Recipe Schema fields for each post. However, you can utilize variables to pull in dynamic data from your post metadata to make the process easier and more efficient.
If you have any more questions or need further assistance, feel free to ask. We’re here to help!
Sources:
Configuring “Schema Markup” in Rank Math » Rank Math
Recipe Schema Type » Rank Math
Even RankMath Pro doesn’t have that feature?
can it be done with templates? – https://rankmath.com/kb/schema-templates/
As I understand, I can create a Recipe Schema template and fill the fields with variables. Then I can use thatschema on my recipes.
Or am I mistaken?
Hello,
If you’re using custom fields like ACF, you can fetch it by using the %customfield(field-name)%
variable in the schema template (Rank Math PRO).
If not, then you may need to register a new variable to fetch the custom field value and use it in the properties in the schema builder:
https://rankmath.com/kb/variables-in-seo-title-description/#how-to-add-custom-variables
In Rank Math free, you may customize this filter to update the Recipe schema data and fetch the custom field value for each of them:
add_filter( 'rank_math/snippet/rich_snippet_recipe_entity', function( $entity ) {
return $entity;
});
Here’s a guide you can follow as well on how to add filters on our site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Looking forward to helping you.
Yes, I use ACF. So, it’s possible with RankMath Pro, right?
Hello,
Yes, you can use the variable in the schema to fetch the recipe data value from the custom field.
Looking forward to helping you.
This means that I can create template once and then all recipes will have that schema right?
Hello,
Yes, with Rank Math Pro, you can indeed create a Schema template using the variables that pull data from your custom fields. Once the template is set up, it will automatically apply the Recipe Schema to all your recipes, ensuring consistency and saving you time.
Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.
Hello,
We are glad to hear that this issue has been resolved. Thank you for letting us know. This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.
We appreciate your patience and cooperation throughout this process.
Thank you for choosing Rank Math.n