Commercial Office Bangalore Commercial Office Bangalore Commercial Office Bangalore

How to hide Geo tag to appear in vcard but still making available it fot google bot

301 Views Asked by At
<div class="vcard" itemscope itemtype="http://schema.org/LocalBusiness">
     <strong class="fn org" itemprop="name">Commercial Office Bangalore</strong><br/>
              <span class="adr" itemprop="address" itemscope itemtype="httep:schema.org/PostalAddress">
                <span class="street-address"itemprop="streetAddress">330, Raheja Arcade, 1/1 Koramangala Industrial Layout</span><br/>  
                   <span class="locality"itemprop="addressLocality">Bangalore</span>
                     <span itemprop="postalCode"class="postal-code">560095</span><br/>
                      <span class="region"itemprop="addressRegion">Karnataka</span><br/>
                     <span class="country-name">India</span><br/>
                  <span class="tel id"="phone"itemprop="telephone">+91-80-41101360</span><br/>
                <span class="geo"itemprop="geo"itemscope itemtype="http://schema.org/GeoCordinates">
              <abbr class="latitude" property="latitude">12.936504</abbr>
            <abbr class="longitude" property="longitude">77.6321344</abbr>
         <meta itemprop="latitude" content="12.936504" />
       <meta itemprop="longitude" content="77.6321344" />
   </span>
 </span>

I want to make lat and logitude invisible for user and visible for Google bot. What shall I do?

2

There are 2 best solutions below

2
unor On

If you mean the Microdata (using Schema.org):

Just remove the abbr elements. You are already giving this data in meta elements (which can be used in the body), which is the correct way to provide data that should/can not be visible on the page:

<meta itemprop="latitude" content="12.936504" />
<meta itemprop="longitude" content="77.6321344" />

(Note that you were using property attributes, but they are not allowed in Microdata, only in RDFa.)

(Also note that you use http://schema.org/GeoCordinates but it should be http://schema.org/GeoCoordinates. And httep:schema.org/PostalAddress is also wrong.)

If you mean the Microformat (using hCard):

You could reuse the meta elements used with Microdata:

<meta class="latitude" itemprop="latitude" content="12.936504" />
<meta class="longitude" itemprop="longitude" content="77.6321344" />

But I’m not sure if all Microformat parsers support this.

0
albert On

The abbr elements with lat and lon can be set to display:none, which does exactly what you are asking for, hiding the content from humans, while still serving it up to bots:

abbr{display:none}  
/** or **/
.latitude,
.longitude{display:none}  

Although I can't honestly see what's wrapping them in your example. Ff the span with class .geo is the parent element, you could make that display:none instead.