Senin, 13 Februari 2017

19.13

Tutorial on How to Remove Date from Meta Description in Search Results of WordPress blog. Methods explained in this tutorial are tested well and works on any WordPress theme. Well, there are many factors to be considered before removing date from search results description.remove-date-timestamp-google-search-results

Reasons to Remove Date from Search Results

There are many reasons to remove date from search results description and some important ones are mentioned below.
  • To maintain the freshness of the content.
  • To improve CTR in Google Search Results.
  • To get extra space for text in META Description.
For better SEO use WordPress SEO by Yoast Plugin

Is it Necessary to Remove Date from Search Results ?

This completely depends on the niche of the blog you are working on. Tutorials, tuts, reviews and how-to guides will remain same for years (till the reviewed product / software is updated) and for articles written on them, there is no need to display date.
remove-date-from-search-results-description
Coming to other things like daily news, magazines, sports etc related blogs and websites update content regularly and there is a need to display date, so that readers can easily find recent stories with breaking news.
remove-timestamp-from-search-results-description

Remove Date from Meta Description in Search Results

Date can be removed from search results description in many methods. We have researched well and found these following methods, which are working well. Check them all and follow any one of them based on your skill set.

1. Using Code in Functions File

This can be considered as the aggressive version of removing date and time-stamp from your WordPress blog. It is very powerful and removes the function of every php code, that helps to generate date. Date displayed in the comments will also be completely removed.
/** Start of Remove Date TimeStamp from blog posts */
function remove_post_dates() {
add_filter('the_time', '__return_false');
add_filter('get_the_time', '__return_false');
add_filter('the_modified_time', '__return_false');
add_filter('get_the_modified_time', '__return_false');
add_filter('the_date', '__return_false');
add_filter('get_the_date', '__return_false');
add_filter('the_modified_date', '__return_false');
add_filter('get_the_modified_date', '__return_false');
add_filter('get_comment_date', '__return_false');
add_filter('get_comment_time', '__return_false');
}
add_action('loop_start', 'remove_post_dates');
/** End of Remove Date TimeStamp from blog posts */
Add this code to functions.php file in your theme and update it. Wait for Google Search Bots to crawl and index your blog posts. Date will be removed from meta description of search results.

2. Using a WordPress Plugin

This is simple and recommended method to remove date from search engine description. We got a cool WordPress plugin, that helps to remove date easily.
Date Exclusion SEO
If you dont want to mess up with code and like to install a plugin in two simple steps, then Date Exclusion SEO is for you. This is a great plugin that helps to remove dates from posts, tags, category and author pages.
date-exclusion-seo-plugin

3. Using JavaScript Method

This can also be considered as the manual method, in which you need to replace date and time code with a JavaScript based one. Generally date can be found in single.php and comments.php file of your WordPress theme.
If the_time is used:

<?php the_time('F j, Y') ?>

Should be replaced with by the below code.

<script language="javascript" type="text/javascript">document.write("<?php the_time('F j, Y') ?>");</script>
OR
If the_date is used:

<?php the_date() ?>

Should be replaced with by the below code.

<script language="javascript" type="text/javascript">document.write("<?php the_date() ?>");</script>
Now, you need to wait till your website is re-crawled by Google. Date will be completely removed from SERP results description.
Hope you like this informative article on how to Remove Date from Meta Description in Search Results. If you got any query or if any of the methods mentioned above are not working, drop a comment here and we will get back to you very soon.

0 komentar:

Posting Komentar