Recipe Data structure problems

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3569
    umut1989
    Participant

    Hello,

    I have recipe page, and I am using a theme which does not have build in rich snippets. So I have been trying to add it with various plugins and I chose the SNIP plugin because I have a very specific problem. The meta data I have for recipeIngredients and recipeInstructions are inside an array. After googling I found this https://rich-snippets.io/how-to-work-with-custom-fields/ which is a solution to my problem. But it does not work at all. I can’t get my instruction or ingredients to show up at all. How can I resolve this issue?

    #3570
    Florian
    Keymaster

    Hey there,
    and thanks for your message.

    There was a bug prior version 2.24.0 which caused an issue using arrows in the textfield of the Postmeta field type. So I would recommend up upgrade to the latest version first.

    If the problem still persists, please post the structured of the array from the database.

    Also please note that the data needs to be stored in the wp_postmeta database table. SNIP cannot access data from anywhere else at this point in time.

    Greetings
    Flo

    #3572
    umut1989
    Participant

    Hi Florian,

    I have updated to the latest version, so that is not causing the issue.

    Here is a screenshot of what it looks like in the database. It is in the wp_postmeta table.
    Screen of the data

    When I try to get the table with another plugin it does show up in the Google Search Console. But with that plugin I can’t select the specific value I want.
    Google Search Console rich text values

    When I try to select the metadata with SNIP it doesn’t show anything at all. I have tried doing “qodef_recipe_single_ingredients_items->qodef_recipe_single_ingredients_text” but with no luck.

    Greetings,
    Umut

    #3576
    Florian
    Keymaster

    Hey Umut,
    and thanks for the clarification.

    I guess what you’re trying to achieve is to loop through the recipe items, correct? Unfortunately that doesn’t work. But you can access the single items. Try the following for the first item:

    qodef_recipe_single_ingredients_items->0->qodef_recipe_single_ingredients_text

    For the second item you do:

    qodef_recipe_single_ingredients_items->1->qodef_recipe_single_ingredients_text

    And so on.

    Because you don’t know how much ingredients you have, I would ask a developer to build a custom loop for you which would it make it way easier for you.

    • This reply was modified 1 year, 7 months ago by Florian.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.