Schema

#73346
  • Resolved Zaphire
    Rank Math free

    I have used the recipe schema, but it is showing up below my content for the recipe I have already created, am I using the schema correctly?
    Am i supposed to use a short code for this or perhaps am I already using schema format within my original recipe post and hence do not need to use schema, could you please help me to clarify this Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    You can add the following code snippet on your theme’s functions.php file to disable the schema data on your posts:

    /**
     * Filter: Allow disabling the review display.
     *
     * @param bool $return true to disable.
     */
    add_filter( 'rank_math/snippet/review/hide_data', '__return_true' );

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today.

    I have checked and don’t worry, you are just using one recipe Schema. It is showing at the bottom because, in the Schema configuration of that post, you have set to show it at the bottom of the content, you could just set to use the shortcode and then place it wherever you prefer.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi!

    One question. If I just want to show the rating tool? Because right now I´m not using the shortcode because I don´t need to use all schema information (I already have it in the recipe) but I want to show the rating tool…My schema is working, Google told me that, but I´m still don´t know how to show the rating starts.

    How can I do that?

    Thank you!

    Zaphire
    Rank Math free

    So by doing this it will add the Schema Markup for Google to read without displaying the actually data on my website?

    But what if I changed the format of my recipe template to match the Schema markup structure would that mean Google will be able to the Schema markup details using just my recipe template rather than adding a Schema Markup to the php file also?

    Sorry, just trying to figure this out to be sure.

    Thanks

    Zaphire
    Rank Math free

    But what if I changed the format of my recipe template to match the Schema markup structure would that mean Google will be able to the Schema markup details using just my recipe template rather than adding a Schema Markup to the php file also?

    And also what if i do not want the schema to be shown on my page, do I just put it into the php file?

    Thanks

    Alberto
    Rank Math business

    Hello,


    @borjacamara
    ratings are bounded to the shortcode, but you could use external plugins (like https://wordpress.org/plugins/rate-my-post/) to display user rating option (and also adding it to the Schema).

    Zaphire, you can just don’t show the shortcode, it will be still in the Schema Markup. Just be sure you fulfill all the recipe data in the Schema window in Rank Math and everything should be ok (you can test it here: https://search.google.com/test/rich-results).

    Looking forward to help you.

    • This reply was modified 4 years, 1 month ago by Uzair. Reason: removed user's name
    Zaphire
    Rank Math free

    Thank you for your response, so if i want to hide the schema data shortcode i should insert this into my PHP file:

    /**
    * Filter: Allow disabling the review display.
    *
    * @param bool $return true to disable.
    */
    add_filter( ‘rank_math/snippet/review/hide_data’, ‘__return_true’ );

    Or is there another way to do it, also what if i am not using a child theme will this still be okay to add to the php file?

    Thanks

    Hello,

    Thank you for the follow up.

    Whichever theme you are using, child or parent, if you add the code to the functions.php file to the active theme the schema will be hidden from the front end and the markup will only be added in your structured data/rich results.

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Zaphire
    Rank Math free

    Thank you for your response Michael, so can i drop the code snippet anywhere in the functions.php section? Do you have a guide on how to add this, as i have never done this?

    Also what does Alberto mean that this code snippet is the ‘dont show the shortcode’ option or is he referring to something else?

    Thanks

    Alberto
    Rank Math business

    Hello,

    You just need to add your previous code at the end of the functions.php file of your current active theme (and if you have a cache, empty it) and everything should be working as you want.

    Looking forward to help you.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this ticket.