How can I create the recipe schema by automatically taking data from ACF PRO?

#431148
  • Resolved Roberto
    Rank Math free

    Hi, I have a recipe blog and would like to know how to create the recipe schema by automatically taking data from Advanced Custom Fields PRO (some are repeater fields). For example, I’d like to know if there is a way to set Rank Math to automatically take the preparation time, ingredients, etc.? Thanks

Viewing 1 replies (of 1 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with automating the addition of custom variables to your recipe schema.

    You may need to create custom schema using the Rank Math filter to extend JSON+LD data:

    
    /**
     * Collect data to output in JSON-LD.
     *
     * @param array  $unsigned An array of data to output in json-ld.
     * @param JsonLD $unsigned JsonLD instance.
     */
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	return [];
    }, 99, 2);

    With Rank Math PRO you can create custom schema templates along with custom schema variables. You can check the following article on schema templates: https://rankmath.com/kb/schema-templates/

    Hope that helps. Please let us know if you have questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘How can I create the recipe schema by automatically taking data from ACF PRO?’ is closed to new replies.