Hello Everyone,
I need to customize the single post. Need help.I am working on a cooking recipes site, and i want to add appropriate schema markup in it. Here below is the example html code.
<div itemscope itemtype=”http://schema.org/Recipe”>
<h1 itemprop=”name”>Grandma’s Holiday Apple Pie</h1>

By <span itemprop=”author” itemscope itemtype=”http://schema.org/Person”>
<span itemprop=”name”>Carol Smith</span>
</span>
Published: <time datetime=”2009-11-05″ itemprop=”datePublished”>
November 5, 2009</time>
<span itemprop=”description”>This is my grandmother’s apple pie recipe. I like to add a
dash of nutmeg.</span>
<span itemprop=”aggregateRating” itemscope itemtype=”http://schema.org/AggregateRating”>
<span itemprop=”ratingValue”>4.0</span> stars based on
<span itemprop=”reviewCount”>35</span> reviews </span>
Prep time: <time datetime=”PT30M” itemprop=”prepTime”>30 min</time>
Cook time: <time datetime=”PT1H” itemprop=”cookTime”>1 hour</time>
Total time: <time datetime=”PT1H30M” itemprop=”totalTime”>1 hour 30 min</time>
Yield: <span itemprop=”recipeYield”>1 9″ pie (8 servings)</span>
<span itemprop=”nutrition” itemscope itemtype=”http://schema.org/NutritionInformation”>
Serving size: <span itemprop=”servingSize”>1 medium slice</span>
Calories per serving: <span itemprop=”calories”>250 cal</span>
Fat per serving: <span itemprop=”fatContent”>12 g</span>
</span>
Ingredients:
Thinly-sliced <span itemprop=”ingredients”>apples</span>:
6 cups
<span itemprop=”ingredients”>White sugar</span>:
3/4 cup
…
Directions:
<div itemprop=”recipeInstructions”>
1. Cut and peel apples
2. Mix sugar and cinnamon. Use additional sugar for tart apples.
…
</div>
</div>
Hi,
A solution may be to create a custom post type and build a template which includes the recipe schema markup.
Unfortunately i can’t provide a quick solution for this, after you build your template test the post on https://developers.google.com/structured-data/testing-tool/ – and adjust until you fix all errors.
If you don’t know how to do this i suggest that you look for a professional developer to help you with this task.
Thank you!
Hi Emil G,
Thank You for the reply, i am using child theme, i want to edit the existing post type, as i can’t afford a new custom post type, url structure will be disturbed. Do guide me which template file i have to edit for the single post.
Kind Regards,
SJlabar
Hi,
The files used for post templates are these – http://screencast.com/t/89FWt0iP and the functions used here you ca find them in td_module_single_base.php file – http://screencast.com/t/d3aDpcWkOdT You will need custom modifications for this, unfortunately we cannot provide custom work at this time, sorry!
Thanks!
Hi,
You can find all the post templates in the root of the theme(loop-single.php and single.php > default post style and so on) – http://screencast.com/t/UINeVAKqclR7 and almost all functions used on post templates are created in td_module_single_base.php and also tyhe schema markup – http://screencast.com/t/9aatssPR0r5
Thanks!
Hello,
If you use a text editor and do a search through the theme files you will see every place a schema information is mentioned in the code like so: http://screencast.com/t/oOiGZJH9u3ui
Thank you!
Hi,
Notepad++ is a decent text editor. There are better ones out there though but not free (we use php storm btw https://www.jetbrains.com/phpstorm/)
Best of luck on your project.
Thank you for your message.
Hello,
Kindly check http://www.cookingrecipes.com.pk/vanilla-cupcake/ i have a recipe schema setup, but seeing 121 errors of article schema, i searched everywhere, but didn’t see any article schema.http://prntscr.com/9ydu64
Thanks,
Hello,
I have checked your website and saw that you are using an older version of the theme and google changed their tool a bit since then. Please update your theme and then check your post in the structure data tool again.
The article schema info can be found here: http://screencast.com/t/VdbusyRP9 in the same file mentioned above.
Thank you!