Beginner's Guide for WordPress / Start your WordPress Blog in minutes

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="">
<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="">
<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>
<li class="tel" itemprop="telephone">Your phone number</li>
<li class="email" itemprop="email"><a href="<?php antispambot( '' ) ?>"></a></li>

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 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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

14 CommentsLeave a Reply

  1. 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?

    • 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.


  2. 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

  3. 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

  4. 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.


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

    Seems like that would ensure consistancy.

    • 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.


  6. 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 ?

  7. 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?

Leave A 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.