Need to Customize the Single Post

Posted in: Newspaper
Post count: 96

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”&gt;
<h1 itemprop=”name”>Grandma’s Holiday Apple Pie</h1>

By <span itemprop=”author” itemscope itemtype=”http://schema.org/Person”&gt;
<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”&gt;
<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”&gt;
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>

Post count: 96

Please Help

  • This reply was modified 11 years by sjlabar.
Post count: 1291

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!

Post count: 96

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

Post count: 7909

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!

Post count: 96

Hello,

In the updated theme, where can i see the schema markup code ?

Thanks,

Post count: 96

Hello,

I located the single post schema, but now i am having trouble in finding the layouts for sidebar widgets/blocks and related posts, i also need to know their functions files.

Thanks

Post count: 7909

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!

Post count: 96

Thank You Alin for the reply, but i am not being able to see the schema markup for the blocks, which i am using in widgets, and the related posts

Post count: 22421

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!

Post count: 96

Thank you for the response, which text editor you suggest ? I am using notepad ++ right now.

Post count: 22421

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.

Post count: 96

Hello,

Yes i searched the schema and replaced it, but still i am seeing article schema in the sidebar content blocks for recent posts. Not being able to locate the place from where it is coming.

Post count: 22421

Hi,
Please provide more details so we can investigate this. A screenshot will be very helpful so we can see exactly the schema information you are trying to remove.
Thank you!

Post count: 96

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,

Post count: 22421

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!

Post count: 96

Hello,

Updated and now everything works fine, i want to activate the rating stars on pictures with Yasr – Yet Another Stars Rating

How can i do that ? Please guide.

Thanks,

Post count: 22421

Hi,
Unfortunately the plugin is not tested to work with our theme so we cannot say for sure how to implement it. You will have to use a bit of trial and error if you plan to use that plugin.
Thank you!

Post count: 4

sjlabar hello, I would also need to introduce the tags for recipes ..
name
preparation time,, etc etc ..
please consider writing as you have modified the file td_module_single_base to help people like me who has had this problem

Post count: 96

Hello mirkop86,

I got this done from a developer, hired from the envato studio. He customized the theme for me.

Viewing 20 posts - 1 through 20 (of 20 total)
The forum ‘Newspaper’ is closed to new topics and replies.