Rich Pins has been introduced by Pinterest. Here are the easy ways how you can use for WordPress to validate your rich pins and apply to get them on Pinterest. If you are new to our website, clearly know – we hugely dislike to use lot of Plugins – unless it is mandatory to use, like Akismet is almost a must, we do not recommend to add some new plugins or some SEO plugins. WordPress is coded in a way, if you have some kind of same plugin, without really knowing many things about PHP, you can actually edit the plugin a bit and get more features. First read our previous article – Showing Open Graph Protocol og image, og description Properly. As you can see, lot of things are written there in the old post. Practically, if you apply them, you can validate your rich pins and apply to get them on Pinterest. So is this guide Rich Pins Pinterest for WordPress is the old wine in new bottle? Not really.
Rich Pins Pinterest for WordPress : Understanding the Ways Pinterest Demands
As we have applied the above method written in the previous guide, we basically have passed their validation tool :
1 | http://developers.pinterest.com/rich_pins/validator/ |
Please note that, in this article Rich Pins Pinterest for WordPress, we can only tell you how to get validated, we can not give any warranty whether pinterest will actually pass your application – we do not know that way how they approves. Its not Facebook, Twitter or Google Plus where in all cases we can give warranty. We also have applied for. We have quite huge number of re-Pins, Favs for certain articles like this post has 2K+ re-Pins – its naturally obtained, not from some paid service. We are mentioning this point because an internet marketer might think in wrong way – they will try to ‘invest’ to get more re-pins, favs etc. Thats not the point – we want to clearly say – making technically right is not only the way to get approved, at least for now.
---
There are three ways :
1 | http://developers.pinterest.com/rich_pins/ |
Technically we have used the Open Graph Protocol, that is a Semantic Markup plus we have Schema.org Semantic Markup for each web page. As we have seen the flaw :
- For Twitter, Facebook we need to use Open Graph Protocol
- For HTML5 websites for getting ready for future, we need to use Schema.org markups
But, if both used, that is the normal case for usual websites today, data from Open Graph Protocol will be shown by Pinterest and Schema.org will be fully ignored. This is a big issue for the commercial websites selling products. If you look at that “Basic format for single product pages” chart in this webpage :
1 | http://developers.pinterest.com/rich_pins/ |
You’ll understand that, this is an issue for some users. So far, for Twitter-Facebook-Google Plus battle, we had no such issue, because we never needed the pricing part, Author part, date updated etcetera parts in Open Graph Protocol. Flaw is that – Pinterest show throw two options to select – which one? We found two ways to fetch data from your website – Schema.org markups and Open Graph Protocol. So, this Rich Pins Pinterest for WordPress guide is not old wine in new bottle.
Rich Pins Pinterest for WordPress : Getting All the Tags
We joked, but practically again we are going to modify the plugin like we did in the article Showing Open Graph Protocol og image, og description Properly. As we have shown – its me, ‘we’ will not work here, I modified it – See in GitHub. So, what we will do is, we add some more lines to get the missing tags. These things, I want to say the ‘lines’ (that is snippets) is basically of WordPress function. You have heard no, “calling WordPress Functions” ? Not everyone is efficient in coding, these are the basic things. Understanding the logic enables an educated person to do whatever of wish in own way. So, we need to go to WordPress Codex and find the intended function reference, like for date published :
1 | http://codex.wordpress.org/Function_Reference/the_date |
Now look at this code :
https://github.com/AbhishekGhosh/WPFBOGP/blob/master/wp-facebook-ogp.php
Its written in English! Can you see there are parts written in this way :
1 | /** |
1 | * Parses the output for the description for falls back to some sensible |
1 | * defaults. |
1 | * * @param string $content |
1 | * @return string |
1 | */ |
That one stanza is for creating the new function. This is to fetch the data. If you scroll down more, you’ll see like these :
// We follow the same flow as titles, where we try to match any
// existing description before moving onto the fallbacks.
Then $ sign, echo – these are for printing the things in your head. Not your head, your webpage’s header ! The star, double slashes are to escape computer’s eyes – we say they are commented out – these parts are for human understanding.
So, frankly you’ll copy one function, paste on any text editor, change the commented out line (Like Parses the output for the date published…) and add echo function. Obviously, simple copy pasting will not work, for date, if ( empty( $wpfbogp_images ) && ! $fallback ) will not work, you copied from getting image block of codes. Change to your own need. That is partially from WordPress codex.
But what will happen if you need a function that is not present in WordPress but a Plugin? Like you need the pricing one? You need the source code and documentation of that Plugin. You have to to call that function. Unfortunately, there are paid WordPress Plugins which practically do not write comments in the way we have shown or neither have good documents. They do it to ”circumvent’ the Free GNU GPL way and to charge some money. You need to find the functions by checking all the files line by line. Its quite difficult.
If you still need help, ask in WordPress Forum. If you want to get help, there are many people who will help you without any reason.
Update on 8th October, 2013 : Pinterest ultimately accepted our request. Rich Pins on Pinterest is active for this website. There was no official notification, we saw the desired changes on 29th of October.