itsnero.blogg.se

Google rich snippets testing tool
Google rich snippets testing tool






google rich snippets testing tool
  1. GOOGLE RICH SNIPPETS TESTING TOOL INSTALL
  2. GOOGLE RICH SNIPPETS TESTING TOOL CODE

GOOGLE RICH SNIPPETS TESTING TOOL CODE

You’ll either have to fig­ure out the ori­gin­al theme’s code and edit it, or refer to the details for spe­cif­ic themes below.We’re going to add the fol­low­ing (and modi­fy it as it explains).If they are we will just add the extra dateUp­dated item­prop but if they are dif­fer­ent we will out­put some extra text to the visitor We are going to check if the pub­lished and updated dates are the same.You can search through your theme files, or refer to theme spe­cif­ic details below where I have provided details for lots of themes This will almost cer­tainly use the word­press func­tion get_the_date(). We need to find the file that con­tains the code which gen­er­ates the pub­lished link.We will need to do this for posts, pages, archives and the homepage. We’re going to add some addi­tion­al inform­a­tion to post head­ers, both for search engines and for our vis­it­ors. We’re also going to change from micro­formats to microdata at the same time. I recom­mend the prop­er way of course, but if neces­sary you can resort to the quick hack. This is a pity, because updated is required where­as pub­lished actu­ally isn’t! Adding it is easy though, and again, there are 2 ways, the prop­er way and the quick hack way. Most word­press themes include inform­a­tion about when the post was pub­lished in the post inform­a­tion area, but very few also include when it was last updated. This code will use the post author’s google pro­file url if there is a val­id one, and will use a default (yours) if there isn’t. Don’t for­get to change my google pro­file url to yours. If you’re insist­ent about not using the Yoast plu­gin you will need to manu­ally add the fol­low­ing code to header.php (assum­ing you have one).Now, if you’re using the Yoast plu­gin, go to the SEO menu and select Titles and Metas, click on the Home menu at the top of the page and in the Author high­light­ing pull­down box select the user you want to use as the author of the homepage.Make sure either you, or your oth­er site authors do the same thing, and each link to your own google profiles.In the Google+ field add a link to your google pro­file (e.g.

google rich snippets testing tool

  • Go to your author pro­file in the word­press admin inter­face (hov­er over Users in the left-hand menu, and click on Your Pro­file).
  • GOOGLE RICH SNIPPETS TESTING TOOL INSTALL

    Install the Yoast SEO plu­gin OR add the fol­low­ing code to the functions.php file of your themeĪdd_filter ( ‘user_contactmethods’, ‘update_contactmethods’, 10, 1 ).There are 2 altern­at­ive ways to do this, I highly recom­mend using the Yoast SEO plugin. Now we need to add a link from your author page to your google pro­file. )Īdd a link from your site to your google profile Make sure the box to the right of the text con­trib­ut­or to is set to public.Under the con­trib­ut­or to sec­tion click Add cus­tom link.Scroll down until you see the links sec­tion some­where towards the bot­tom right of the page.Ideally you will need all of your authors to have a google pro­file that is linked to your site in the same way as this. You will see on my google+ pro­file that I have a pub­lic link to - you will need the same for your own site. So lets get started… Add a link from your google profile to your site Once you’ve man­aged that you should find adding extra markup is rel­at­ively easy. I’m not going to cov­er all the option­al extras in this art­icle, just the basics to get your site to val­id­ate with the tool. It also makes more sense as sev­er­al of the steps are the same regard­less of what theme you are using. This makes it easi­er to keep up to date, and means there is just 1 cent­ral point for all requests and dis­cus­sion. Instead of hav­ing lots of sep­ar­ate art­icles for dif­fer­ent themes I’ve decided to try to provide all the inform­a­tion in 1 guide.








    Google rich snippets testing tool