Remove Sharing Buttons From Home Page Of Blogger Blog:

The Original Post can be found HERE

This method will remove sharing buttons from homepage of a blog but those sharing buttons will still appear under each post on separate pages allowing users to share blog posts on social media websites.

Follow these steps:

1- Backup your blog template first. For that purpose, go to Blogger dashboard > Template > Backup / Restore > Download Full Template. You will get a copy of your blog template on your computer using which you can restore the template if anything goes wrong while applying the customizations.

2- Go to the HTML Editor (Blogger dashboard > Template > Edit HTML) and locate the following opening tag:
<b:includable var='post'>

3- Expand that and find this code:
<div><b:if cond='data:post.sharePostUrl'><b:include data='post' name='shareButtons'/></b:if></div>
<p>

4- Now, exactly in the beginning of the code which is displayed in Step No. 3, add the following code:
<b:if cond='data:blog.pageType == "item"'>

and at the end, add the following tag:
</b:if>

So, the whole code will look like this:
<b:if cond='data:blog.pageType == "item"'>
<div><b:if cond='data:post.sharePostUrl'><b:include data='post' name='shareButtons'/></b:if></div>
<p></b:if>

[For your ease, you can directly replace this code with the code displayed in Step No. 3.]

5- Preview and save the template.
I shall recommend to disable separate “Email Post” button because that one is also included among other sharing buttons with  the title “Email This”. It does not make any sense to have two Email buttons for the same purpose. To disable separate “Email Post” button, go to Blogger dashboard &gt; Layout &gt; Blog Posts &gt; Show Email Post Links. Unselect that and press “save” button. You can also hide that from home page if you do not want to disable that. For that purpose, locate the following codes: (See Step No. 2 above)

<!-- email post links --><b:if cond='data:post.emailPostUrl'><span><a expr:href='data:post.emailPostUrl' expr:title='data:top.emailPostMsg'><img alt="" class="icon-action" height="13" src="http://benignblog.com/wp-content/uploads/2013/10/icon18_email.gif" width="18" /></a></span></b:if>

Replace the code displayed above with the following code:

<b:if cond='data:blog.pageType == "item"'><!-- email post links --><b:if cond='data:post.emailPostUrl'><span><a expr:href='data:post.emailPostUrl' expr:title='data:top.emailPostMsg'><img alt="" class="icon-action" height="13" src="http://benignblog.com/wp-content/uploads/2013/10/icon18_email.gif" width="18" /></a></span></b:if></b:if>

Preview and save the template.
Note: Sometimes, even if you have already saved the template and wants to go back to the Blogger dashboard, an unpredictable message “You have unsaved changes that will be lost” appears. Just ignore that message. That appears due to the redesigned HTML editor. It won’t bother again when you open HTML editor the next time.

0 comments:

Post a Comment