Hi,
How do I ensure that I show microdata in my custom post types? I'm building a food site and it will have recipes as post types. However I couldnt find a way to have microdata to integrate with this. There are other out of the box recipe plugins that provide for microdata support but that would mean that I would have to forego the power of Types and Views. Please advise.
Hi roshanK,
I am not familar with Schema.Org, what is the microdata you mentioned above?
Could you describe more details about the questions?
Thanks
Apologies for coming back late. Microdata markup basically enables you to create special tags for content such as recipes, reviews, places and so on. Search engines rank content higher that are marked with microdata tags - basically helping in your SEO efforts.
Here's an example of how a 'recipe' can be constructed using microdata or rich snippets - hidden link
Wordpress already has plugins for these such as recipress (hidden link), easyrecipe (hidden link). However these plugins do not create seperate custom post type.
I'd like to create a custom post type called 'recipe' (which will have custom fields that support rich snippets). Can I do this through types? My technical skills are heavily limited 🙁
Funnily enough, I was going to check on the schema as this was added to your ToDo list last year ( https://toolset.com/forums/topic/schema-org/ ). I think it is an important part of the puzzle which Toolset should implement. For instance, it would be very useful to have in your Reviews setup together with the traditional starts etc.
Thanks for the details, I have put it in our to-do list, our developers will take care of it.
Hey there, I have managed to add microdata by manually adding the fields into my Content Template. It really is quite simple. Here is some of my code. Below is a very good tutorial which I used to achieve this. Hope it helps 🙂
<h3 class="entry-title">[wpv-post-title]</h3>
<strong>Contact Details</strong>
[wpv-if contact-person="wpcf-contact-person" evaluate="!empty($contact-person)"]
<div itemprop="founder" itemscope itemtype="<em><u>hidden link</u></em>"><strong>Contact Person:</strong> <span itemprop="name">[types field="contact-person" class="" style=""][/types]</span></div>
[/wpv-if]
[wpv-if phone="wpcf-phone" evaluate="!empty($phone)"]
<div><strong>Phone:</strong> <span itemprop="telephone">[types field="phone"][/types]</span></div>
[/wpv-if]
[wpv-if mobile="wpcf-mobile" evaluate="!empty($mobile)"]
<div><strong>Mobile:</strong> <span itemprop="telephone">[types field="mobile"][/types]</span></div>
[/wpv-if]
[wpv-if fax="wpcf-fax" evaluate="!empty($fax)"]
<div><strong>Fax:</strong> <span itemprop="faxNumber">[types field="fax"][/types]</span></div>
[/wpv-if]
[wpv-if website="wpcf-website" evaluate="!empty($website)"]
<div><strong>Website:</strong>[types field="website"][/types]</div>
[/wpv-if]
[wpv-if email="wpcf-email" evaluate="!empty($email)"]
<div><strong>E-Mail:</strong> <span itemprop="email">[types field="email"][/types]</span></div>
[/wpv-if]
[wpv-if opening-hours="wpcf-opening-hours" evaluate="!empty($opening-hours)"]
<div><strong>Opening Hours:</strong> [types field="opening-hours" class="" style=""][/types]</div>
[/wpv-if]
[wpv-if address="wpcf-address" evaluate="!empty($address)"]
<div><strong>Address:</strong> <span itemprop="address">[types field="address" class="" style=""][/types]</span></div>
[/wpv-if]
[wpv-if area="wpcf-area" evaluate="!empty($area)"]
<div><br /><strong>General Area:</strong><span itemprop="location">[types field="area" class="" style=""][/types]</span></div>
[/wpv-if]
<hr />
<div class="entry-content">[wpv-post-body view_template="None"]</div>
</div>
The tutorial is here: hidden link
Of course, you can get the Schema from here: schema.org