How To Remove Date From Blogger Post URL

It is technically impossible to remove the date from the URL of the blogger post. So there will be a question in your mind that is told on many websites on the internet! Is this wrong? Yes. You can never remove the date from a blogger’s post, all the website you are told is just Redirection Loop Using JavaScript.

Read More: Top Important WordPress Plugins Free Download

Before learning how to remove the date from the URL of a blogger’s posts, let me tell you about some of its disadvantages so that you do not have problems later.

Disadvantages Remove Date From Blogger

If your blog is very old then you do not have to remove the date, if you do this, then your post which is ranked in Google will lose its rank and your traffic will also go away.

If you have started a new blog, then you can remove the date, but I will not suggest you to remove it and leave it as it is, it is better.

Deleting Date from Javascript means setting a redirection loop, you will only see that the date has been removed but the date is not to be removed, whatever is there in the blogger’s system will remain the same. Doing this can also affect your SEO.

How To Remove Date From Blogger Post URL

Before removing the date from the URL of the post, once you see how the full URL looks like before deleting the date.

Remove Date From Blogger Post 3

Step #01

Open Blogger Dashboard and click on the Theme option.

remove1

Step #02

After this, you will see an icon of three dots on the right corner, click on it and click on Edit HTML.

remove2

Step #03

After this the HTML code editor will open in front of you, now you have to press Ctrl + F from the keyboard and search </head>.

Remove Date From Blogger Post 2

Step #04

After this, exactly above the </head> you have to copy and paste the JavaScript code given below.

<script type='text/javascript'>
 
//<![CDATA[
// BloggerJS v0.3.1
// CodeBarta.com. All Rights Reserved.
 
var urlTotal,nextPageToken,postsDatePrefix=!1,accessOnly=!1,useApiV3=!1,apiKey="",blogId="",postsOrPages=["pages","posts"],jsonIndex=1,secondRequest=!0,feedPriority=0,amp="&"[0];function urlVal(){var e=window.location.pathname,t=e.length;return".html"===e.substring(t-5)?0:t>1?1:2}function urlMod(){var e=window.location.pathname;"p"===e.substring(1,2)?(e=(e=e.substring(e.indexOf("/",1)+1)).substr(0,e.indexOf(".html")),history.replaceState(null,null,"../"+e)):(e=(e=postsDatePrefix?e.substring(1):e.substring(e.indexOf("/",7)+1)).substr(0,e.indexOf(".html")),history.replaceState(null,null,"../../"+e))}function urlSearch(e,t){var n=e+".html";t.forEach(function(e){-1!==e.search(n)&&(window.location=e)})}function urlManager(){var e=urlVal();0===e?accessOnly||urlMod():1===e?getJSON(postsOrPages[feedPriority],1):2===e&&(accessOnly||history.replaceState(null,null,"/"))}function getJSON(e,t){var n=document.createElement("script");if(useApiV3){var o="https://www.googleapis.com/blogger/v3/blogs/"+blogId+"/"+e+"?key="+apiKey+"#maxResults=500#fields=nextPageToken%2Citems(url)#callback=bloggerJSON";nextPageToken&&(o+="#pageToken="+nextPageToken),nextPageToken=void 0}else o=window.location.protocol+"//"+window.location.hostname+"/feeds/"+e+"/default?start-index="+t+"#max-results=150#orderby=published#alt=json-in-script#callback=bloggerJSON";o=o.replace(/#/g,amp),n.type="text/javascript",n.src=o,document.getElementsByTagName("head")[0].appendChild(n)}function bloggerJSON(e){var t=[];if(useApiV3||void 0===urlTotal&&(urlTotal=parseInt(e.feed.openSearch$totalResults.$t)),useApiV3){try{e.items.forEach(function(e,n){t.push(e.url)})}catch(e){}nextPageToken=e.nextPageToken}else try{e.feed.entry.forEach(function(n,o){var r=e.feed.entry[o];r.link.forEach(function(e,n){"alternate"===r.link[n].rel&&t.push(r.link[n].href)})})}catch(e){}urlSearch(window.location.pathname,t),urlTotal>150?(jsonIndex+=150,urlTotal-=150,getJSON(postsOrPages[feedPriority],jsonIndex)):nextPageToken?getJSON(postsOrPages[feedPriority]):secondRequest&&(nextPageToken=void 0,urlTotal=void 0,jsonIndex=1,secondRequest=!1,0===feedPriority?(feedPriority=1,getJSON("posts",1)):1===feedPriority&&(feedPriority=0,getJSON("pages",1)))}function bloggerJS(e){e&&(feedPriority=e),urlManager()}bloggerJS();
 
//]]>
 
</script>

Step #05

After that, you have to save this file.

Remove Date From Blogger Post 1

Step #06

After saving the file, you refresh the blog once and visit any one post and see whether the date has been removed from the URL of the post, you can see in the image below that the date has been removed from the URL of our post.

Remove Date From Blogger Post

I hope that you must have liked this information, if you liked it and you think it is helpful, then do share this post on social media.

Leave a Comment