You want a higher search rank? Implement Microdata on your website – simple as that. In fact, Schema has been proven to be so important to your search results, that you really should consider dedicating the time to do it, right now. SEO is code, nothing more, nothing less.
Please note that this article requires basic understanding of HTML and PHP. If you are unsure what to do, we advise you to contact a professional, or ask for professional assistance.
Also Read: Schema – Getting Started
On our last Schema guide, we learned how to implement microdata on static elements. These could range from the body’s tag all the way to assigning data-attributes for links, depending on their significance to our content. There are also different types of itemscope tags.
This time around, we are going to use the Schema attribute for articles (see documentation).
Introductory Points
We’ll be working under the template file single.php, or, if you have assigned different custom post types to your installation, look for single-posttype.php. There is also a more complex way of adding attributes requiring the use of javascript – which provides us with even more liberty.
Let’s stick with single.php: first off, define what the post-page is.
<body itemscope itemtype="http://schema.org/Article"> ... </body>
Crawlers and robots will immediately understand that the page is in fact an article.
Fortunately, we don’t need extra rules for our header, navigation, footer links, related and significant links, site names, pictures and anything else commonly available on every part of our website, because we have already defined those with basic microdata tags. Let’s proceed to our dynamic content.
WordPress Articles
Post titles on WordPress are defined by <?php the_title() ?>, working within a query. We can’t exactly go add a microdata tag in there. That bit of PHP is probably located within a heading tag <h1> or a span class, within your single.php template. Here’s what we can do:
<h1> <span itemprop="name"> <?php the_title() ?> </span> </h1>
Similarly, for our author, contributor, dates and anything else required (see further documentation).
Let’s say we want to dynamically connect our posts to a blog page (Schema=webpage):
<p> <a href="<?php the_permalink() ?>" itemprop="significantLink"> <span itemprop="name"> <?php the_title(); ?> </span> </a> </p>
The premise is to include PHP markup within HTML markup, so you can effectively add data-attributes and microdata tags to classes and spans that hold your dynamic content in place.
Why do this? It’s like handing Google a map of your website.
Also Read: Schema – A Must for Improved Search Results
The examples depicted above are some of the things you can do with your WordPress installation and Schema. You should also check out our handy guide for implementing OpenGraph rules on your WordPress articles. Never forget to experiment in order to achieve the desired results.
Would you like to add anything to this story? Not sure how to implement Microdata on your website or online content? Drop us a comment below and we’ll be glad to help you out!
Related Stories:
- The Simple Secret Behind Getting your Content Shared
- Don’t Miss: Last Week’s Top 5 Social Media News
- 399 Million People Use Facebook Only from Mobile
You might also like
More from Experts Talk
The Reality of Careers in Social Media: Insights from Hootsuite’s Latest Report
What’s it really like to work in social media? Hootsuite’s CMO, Elina Vilk, delves deep into the current landscape of …
Do Google SEO Tactics Work on Social Media?
Do the SEO tactics we use on Google also work on social media? In this article, Hootsuite's Inbound Marketing Strategist, Liz …
Does Custom Alt Text Improve Reach On Instagram?
In this month's experiment, we set out to find out whether adding custom alt text on Instagram posts improves reach.
Does Cross-Posting YouTube Links On Other Platforms Result In Lower Reach?
In this month’s social media experiment, we set out to find out whether posting YouTube links on other platforms results …
Do LinkedIn Pods Work? Performance Insights And Key Learnings
In this month’s social media experiment, we set out to find out what LinkedIn pods are and whether they actually …
Instagram Reels: Do Longer Captions Lead To More Engagement?
Do longer Instagram Reels captions generate more engagement? Amanda Wood, Senior Social Marketing Manager at Hootsuite, and her team find …
Does Boosting Instagram Posts Increase Profile Reach And Engagement?
Does boosting your Instagram posts lead to increased profile reach and engagement? This month, Amanda Wood, Senior Social Marketing Manager …
TikTok’s 7-Second Challenge: Performance Insights And Key Learnings
Does TikTok’s 7-second challenge generate more engagement? Hootsuite's Senior Social Marketing Manager and her team seek the answer.