WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Add Rich Contact Information in WordPress

How to Add Rich Contact Information in WordPress

Last updated on October 24th, 2012 by Editorial Staff
46 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Add Rich Contact Information in WordPress

Web search engines like Google or Bing are trying to pull more and more semantic from the content of the websites they index every day. Specific markups like microdata and microformats have been created to help search engines understand the meaning of your content. Search engines utilize this data to provide additional information on the search results page. Having rich snippets in search has shown to improve click through rate. In this article, we will show you how to easily add rich contact information in your WordPress site, so they can be displayed as rich snippets in the search results.

What are rich snippets for contact?

You may have already seen these rich snippets without even knowing. It adds relevant contact data like address, city, phone number, etc below the description when a website appears in search results page. Here is an example:

Rich Snippet Contact Information

Why should I care?

That’s a good question. Rich snippets can be a great help to show that your content is relevant to the user’s search query. It can increase the CTR (Click Through Rate) of your page in the search results. This is also a great way to stand out against your competitors on your selected keywords. Often local small businesses are behind the curve, so if you are one of the savvy small business owners, then make sure to implement this technique on your site.

How to add rich contact information in WordPress

We will take a look at two methods to insert rich contact information on your WordPress site. One will require a plugin, and the other would be the hard coded method.

Method 1 : with the Rich Contact Widget plugin

The easiest way is by using the Rich Contact Widget plugin. After installing and activating the plugin, go to Appearance » Widgets submenu. You will be able to add the Rich Contact widget in one of the widget areas of your theme. Fill out all your contact information, and let this plugin take care of the required markup for rich snippets.

Additionally, you can display an image map of your location, and provide a download link for a vCard containing your contact data. These are just options for your website visitors, and can be deactivated in the widget configuration.

Method 2: Hard coded in your theme

This method requires to edit your WordPress theme files, where you want the contact information to display. The example below will show you how to add both microdata and microformats, but you can use only one of them (microdata is the recommended one by Google).

<ul class="vcard" itemscope itemtype="http://schema.org/Corporation">
<li class="fn  org" itemprop="name"><strong>Your company name</strong></li>
<li itemprop="description">Your activity</li>
<ul class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<li class="street-address" itemprop="streetAddress">Your address</li>
<li><span class="locality" itemprop="addressLocality">City</span>&nbsp;<span class="region" itemprop="addressRegion">State</span>&nbsp;<span class="postal-code" itemprop="postalCode">Zip Code</span></li>
<li class="country-name" itemprop="addressCountry">Country</li>
</ul>
<li class="tel" itemprop="telephone">Your phone number</li>
<li class="email" itemprop="email"><a href="<?php antispambot( 'youremail@example.com' ) ?>">youremail@example.com</a></li>
</ul>

Microformats uses the class attributes to markup the data, while microdata uses itemtype and itemprop attributes. Detailed information for microdata markup can be found on the schema.org website, same for microformats with the hCard markup.

You can also see there is a function called antispambot() used in this code. It’s a WordPress specific function to protect your email address from spam bots crawling the web. A non-well know function but it is very useful.

Testing for structured data on your website

After utilizing one of the methods above, search engines will be able to get rich snippets data from your website. You can test it on this page by Google. Enter the url you want to preview, and all the structured data extracted will be displayed.

Rich Snippet Tool Verification

And you are done, search engines will now be able to pull rich information data from your website, and after a while it should display on the search results pages. Feel free to comment for any suggestions or questions.

46 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

14 Comments

Leave a Reply
  1. Rameez Riaz says:
    Sep 7, 2019 at 10:54 am

    Sir can you tell me about the 2nd method. When we create a microdata coding file for our website. Then, where do we upload the microdata file?

    Reply
    • WPBeginner Support says:
      Sep 9, 2019 at 9:30 am

      For the code we have in the article, you would place the code where you would want that information displayed on your content such as in the footer or a theme-specific location.

      Reply
  2. Nina says:
    Jul 21, 2015 at 2:23 am

    Your blog is so useful! Thanks for taking time for replies and great content. I was looking on your website about rich pins for pinterest. Could you make a post about that? Thanks. Nina

    Reply
  3. jorge perez says:
    Nov 16, 2012 at 1:01 pm

    Can I create one different for each page? I am a beauty salon, for the “hair extensions” page can I create a different one than the one for “hair color” page?
    thank you
    jorge

    Reply
    • Editorial Staff says:
      Nov 16, 2012 at 6:37 pm

      Sure you can. Use a plugin like Widget Logic for that.

      Reply
  4. Vicente says:
    Nov 7, 2012 at 6:47 pm

    It seems that Google does not support this type of rich snippets … This message appears when I check:

    Warning: This information will not appear as a rich snippet in search results, because it seems to describe an organization. Google does not currently display organization information in rich snippets

    It’s a shame but anyway I’m going to keep my data visible. Thank you very much for teaching me to do this.

    Regards

    Reply
  5. Matt says:
    Oct 30, 2012 at 5:38 pm

    Is it possible to pull from a wordpress admin or user info?

    Seems like that would ensure consistancy.

    Reply
    • Editorial Staff says:
      Nov 1, 2012 at 11:44 am

      Last we checked, address and information like this is not stored in user meta. Also, your address shouldn’t change based on each user. This is more for small businesses.

      Reply
  6. David says:
    Oct 26, 2012 at 12:26 pm

    Thanks for the information. I will give it a try on my site.

    Reply
  7. Diogo Gomes says:
    Oct 26, 2012 at 6:55 am

    Great Tutorial!

    On Method 2: how can we add our photo?

    Thanks

    Reply
  8. William (Web Actually) says:
    Oct 25, 2012 at 5:33 pm

    Hi ! Thanks for this article, really usefull. Must it be displayed on all page of the website ? Or just one page will generate the rich snippet for all the website ?

    Reply
    • Editorial Staff says:
      Oct 26, 2012 at 2:08 am

      Only the pages that contains this post will generate the rich snippets.

      Reply
  9. Brad Dalton says:
    Oct 25, 2012 at 5:51 am

    Syd

    For SEO purposes, where would be the best position on your site to display your contact information?

    Would the footer be a better location rather than a contact or about page as this would display on all pages?

    Reply
    • Editorial Staff says:
      Oct 25, 2012 at 8:25 am

      Yes, you can display it wherever you like. Footer, sidebar, or even in your header.

      Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
RafflePress - WordPress Giveaway and Contest Plugin
RafflePress
Giveaway and Contest Plugin for WordPress. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
wpDataTables
wpDataTables Coupon
Get 20% OFF on wpDataTables WordPress plugin for tables and charts.
Rocket coupon code
Rocket Coupon
Get 50% OFF on Rocket managed WordPress hosting plans for 3 months.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.