LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » WordPress / WordPress Snippets » Add Google Schema.org Meta Tags In WordPress Without Plugin

Add Google Schema.org Meta Tags In WordPress Without Plugin

Add-Google-Schema.org-Meta-Tags-In-WordPress-Without-Plugin
GooglePlus is a SocialMedia platform by Google that is now growing very fast and also good for bloggers to get traffic. Now you write a blog then share it in your GooglePlus account then it will look a simple link that no one will click to view your blog where you even have good content. So here you have to add Google official shared meta tags that will help you o make your links awesome in GooglePlus shares.

Also these meta tags are very worthy to add because it will make your search result awesome too. It is Schema.org tags that Google officially use in Search Results too to pick a site to show in his result.

Social Media is one of the biggest way to get traffic for websites and blogs now everyone use it to get views and share their articles on Social Media to get visitors. One of the biggest Social Media is GooglePlus from where you are getting traffic. Now when you share the article link only in Google Plus then it is not so attractable to catch the viewer attention so you have to show more then a link.

Table of Contents

How To Add Google Schema.org Meta Tags In WordPress Without Plugin?

Step 1:) Open Appearance > Editor File In Your WordPress Dashboard.
Step 2:) Open your Header (header.php) File From The List Of Your Theme File.
Step 3.) Now Press [CTRL+F] To Search </head> in Header (header.php) theme file.
Step 4.) Now Copy The Below Code And Paste It Before </head> in Header (header.php) theme file.

<!-- Schema.org Markup For GooglePlus For WordPress By EXEIdeas Start -->
<?php if (have_posts()):while(have_posts()):the_post(); endwhile; endif;?>
<!-- The Default Values -->
<meta name="robots" content="index" />
< rel="author" href="https://plus.google.com/114679207272870704061" />
< rel="publisher" href="https://plus.google.com/114679207272870704061" />
<?php if (is_single()) { ?>
<!-- Only For Content Pages -->
<meta itemprop="name" content="<?php single_post_title(''); ?>" />
<meta itemprop="description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
<meta itemprop="image" content="<?php if (function_exists('wp_get_attachment_thumb_url')) {echo wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>" />
<?php } else { ?>
<!-- For All Pages Expect Content Page -->
<meta itemprop="name" content="<?php bloginfo('name'); ?>" />
<meta itemprop="description" content="<?php bloginfo('description'); ?>" />
<meta itemprop="image" content="logo.jpg" />
<?php } ?>
<!-- Schema.org Markup For GooglePlus For WordPress By EXEIdeas End -->

Step 5.) Click “Update File” And Done.

How To Check?

If you added the upper code then you must have to check weather you added correct or not so here is a Google Structured Data Testing Tool that is also know as RichSnippet checker where you can view your tags are working or not easily.

Recommended For You:
Trending Most Used Top 10 Essential SEO Tips For Beginners

Customization:

You just have to change 114679207272870704061 with your personal GooglePlus profile ID and 114679207272870704061 with your Blog GooglePlus fan page ID. Also you have to add an image URL at logo.jpg to show this images when there is no image to show. Rest is done.

Theme Files Editing Warning:

Keep in mind that every code that you will add in your themes files will be removed when you will change the theme. So after changing your theme, you have to follow this article again and you will get everything back same as it is now.

Last Words:

This is what we have and shared in easy steps for newbies so that they can easily know how it works. Stay with us because we are going to share a whole guide step by step about WordPress and make it easy for you. If you liked it then share it and be with us to get next tutorial. If you have any problem then feel free to ask us. We will help you with what we can or have.

You Like It, Please Share This Recipe With Your Friends Using...

Be the first to write a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *