If you attended the recent Genesis Round Table – Genesis 2.0: A Conversation, you may have discovered how microdata may help search engines better categorize your content.
After the discussion was over, I decided to check out the microdata documentation at schema.org. This lead me to investigate how the Genesis 2.0 framework implements microdata and how can I set my own schema.
I am not going to get into the specifics and theory of using microdata, as this is still a learning process for myself. However, I recommend looking over the documentation and decide if the subject of your posts or custom post type will fit into a specific schema.
The Genesis Framework and microdata
If you have html5 enabled in Genesis 2.0, default microdata will be implemented by the framework. The semantic html5 elements will have microdata attributes created by the default filters. No extra work needed.
With 2.0, developers will have access to attribute filters. These filters are applied within the genesis_attr() function based on the context parameter. By using genesis_markup() in your plugins or themes, you could automatically add microdata by setting the appropriate context argument or specify your own context and custom attribute filter.
If you are interested in the new filters the markup source code is found within genesis/lib/functions/markup.php.
Specify your own microdata schema
While looking over the microdata schema documentation, the AboutPage and ContactPage schema caught my interest. This specifies the about and contact pages for a website through microdata schema, so I decided to add this schema for my About and Services page.
With the ‘genesis_attr_body’ filter, the default schema can be changed to the AboutPage or ContactPage schema depending on the current page.
A quick note on schemas
The default itemtype of a page is WebPage. Microdata schemas are hierarchical and inherit properties from the parent schema. Because of inheritance, some microdata schemas will share properties with each other. Remember to set the correct properties when switching from the default page or post schema.
Discover your microdata schema
This is just a simple example. The microdata schemas cover many subjects. With the new attributes filters in Genesis, this will let developers easily specify the a microdata schema based on the current context of the website.