Wordpress blog with semantic markup

more than a year since Google, Bing and Yahoo proposed a standard semantic markup Schema.org. But webmasters are not in a hurry to implement the recommendations of the search engines on their websites. And for good reason. For example, representatives of Yandex on the question of the effect of semantic markup on the ranking of the site responded with the following:
"In many cases, the use of markup makes your website more noticeable in Search of Yandex and thus attracts more of the target audience. Yandex is interested in the fact that the users solved the tasks with which they came on Search. One of our quality metrics is called "happy user". Obviously, sites that increase "happiness" will be ranked higher. "


I.e. the use of semantic markup, at least indirectly affect the ranking of the website. Really, because in many cases the snippet of the website layout looks more informative and attractive for user. See how sites look with different partitioning schemes:

1.Products with a rating
image

2. Review
image

As you know, is the user more likely to click on such snippet, and your site will get the profit in the form of higher positions (if other factors are normal). Yandex also recommends the use of markup Schema.org instead of microformats, because the first is more modern and rapidly growing.

It was a small entry about the importance of using semantic markup, we now proceed directly to practical application.

Before me stood a task to make a video blog, so I will talk about the use of microdata for this type of content. But in sample you can make a directory or a blog with new music etc. as a platform I used the CMS Wordpress.

To describe the video clip, you must:
the
    the
  • title of movie
  • the
  • description
  • the
  • screenshot
  • the
  • video
  • the
  • to specify the duration


Now look what schema microdata will suit us. Stop, VideoObject — http://schema.org/VideoObject. Ie we need to add to the overall container-write:

the
itemscope="" itemtype="http://schema.org/VideoObject"


And each of the video settings will be marked up using the settings:
the
<span itemprop="parameter">value</a>


or

the
<meta itemprop="parameter" content="value" />


It is clear that for each video we will not manually write in the html information, the need to simplify the process. From the title of the material we will take names for our videos. With a description of the problems either. And to fill in the remaining fields, we will use the function "custom field". If you still don't know about such functionality in Wordpress, it's time to pay attention. Simply put, custom fields allow any material to add any records. For example, to make a directory of organizations by standard means, by means of the text editor would add all the data of the organization: telephone, address, working hours or used third-party addition. And with the help of custom fields can be an ordinary article to turn into a catalogue of arbitrary data.

That information (in this case, the code microdata), introduced in an arbitrary field, can be used for output in the template, we'll use this code:

the
<?php $image = get_post_meta($post->ID, 'thumbnail', true); if($image !== ") { ?> 
<meta itemprop="thumbnail" content="<?php echo $image ?>" />
<?php } ?> 


or

the
<?php $image = get_post_meta($post->ID, 'thumbnail', true); if($image !== ") { ?> 
<span itemprop="parameter"><?php echo $image ?></a>
<?php } ?> 


where thumbnail — the name of the custom field.

In the thumbnail field, we will enter links to the screenshots to the video. It remains to add embedurl field to reference the video file and the duration to display the duration. By the way, the last parameter is not mandatory, moreover, it requires that you enter dates in ISO 8601 format. http://en.wikipedia.org/wiki/ISO_8601. Parameters name and description will bind to the parts of the code that displays the title and description of the post.
As a player, I used the plugin Stream Video Player.

The result is exemplary for such a snippet:
image

In principle, this might be the end, because these techniques will help you make a site with book reviews, a website with recipes, etc. But since I started to lay out the data on the website, then let us use all the possibilities of semantic markup.

overall rating

Those same stars — http://schema.org/AggregateRating. Without them, the blog with reviews would look inferior. This scheme can also be used for Internet shopping — rating of goods. For Wordpress to invent anything not necessary, the creators of the plugin WP-PostRatings added code to the schema AggregateRating. Will only need to file wp-postratings.php (wp-content/plugins/wp-postratings) find and remove the extra attribute itemscope itemtype="schema.org/Product". And please note that this plugin already includes the parameters itemprop="name" and itemprop="description", i.e. when you install this plugin, you don't need in the template for the title and the description to add something.

Bread crumbs

To the results instead site.ru/categoty/products7232 visible to human readable chain site.ru/Мобильные phones, install the plugin RDFa Breadcrumb. After activating the plugin, in the template insert the code:

the
<?php if(function_exists('rdfa_breadcrumb')){ rdfa_breadcrumb(); } ?>


Open Graph

As it turned out that Yandex has interpreted correctly the video object, you need to add Open Graph markup (http://ogp.me). All meta tags for video objects in the Open Graph markup, duplicate data from Schema.org. Can look closer to the details http://help.yandex.ru/webmaster/?id=1116426. By the way, markup, Open Graph use social media. When people post the link of your site in social. network header data, descriptions and picture take from the meta tags:
the
<meta property="og:title" content="Title"/>
<meta property="og:description" content="Description"/>
<meta property="og:image" content="Picture"/>


For Wordpress there is a plugin for SEO Ultimate, which itself will generate Open Graph markup.

I hope these tips will help you transform dull and monotonous snippets and, possibly, will increase your site position.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Car navigation in detail

PostgreSQL: Analytics for DBA

Google has launched an online training course advanced search