Custom Post Type

#59255
  • Resolved Arif K
    Rank Math free

    Hi,

    I have a website about recipe. I have a custom post type for recipe. Many fields (preparation time, cooking time, ingredients, steps, etc.) are already available in the custom post type. When I select recipe as “Schema Type” in the Rank Math plugin, I do not want to enter the data I entered in custom fields in your “Schema” page again. Can I map the areas for this? For example, to match and synchronize the preparation time in my custom field with the “Preparation Time” field in your “Schema” section.
    Can you send a short piece of code if I can do it with the code?
    I use the CMB2 plugin for custom fields.

    I suggest you take a look at the link below for the best understanding.

    https://drive.google.com/file/d/1TaP_pD30QIycFhzLmHdSQc5IfwmW7-U2/view?usp=sharing

    Another question is that when I fill all the fields from the “Schema” tab for my recipe page and when I look at the recipe’s html code, I see it saved in both “JSON-LD” and “Without Markup” format. I don’t want it to appear as “Without Markup”. You can browse the video below after 00:50 sec.

    https://drive.google.com/file/d/1YDWZYXdWyNxtjlD0TX0mnFPFVLRB0Oec/view?usp=sharing

    Thanks
    Best regards

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can customize the following function to modify your front end schema.

    **
     * Filter to change the schema data.
     * Replace $schema_type with schema name like article, review, recipe etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema}_entity", function( $entity ) {
     return $entity;
    });

    Rank math generates your schema in the “JSON-LD”. Any other schema is likely being generated by another plugin on your site. You can follow this troubleshooting guide to determine which one: https://rankmath.com/kb/check-plugin-conflicts/

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    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 ‘Custom Post Type’ is closed to new replies.