Reputation:
I coded a conditional tag for my share buttons. I wanted the share buttons to appear everywhere apart from in static pages - so the pages element of blogger. I added the following conditional tag to achieve the above stated effect:
<b:if cond='data:blog.pageType != "static_page"'> The share button coding here </b:if>
I followed the instructions to this tutorial - http://icanbuildablog.com/2015/03/blogger-conditional-tags/ - very carefully and made absolutely sure to make no mistake when applying the conditional tag however now the share buttons only appear on item pages - single blog posts.
I have included the full coding I inserted in my template, below:
<b:if cond='data:blog.pageType != "static_page"'>
<div class='sharebtns'>
<a class='twitter' expr:href='"https://twitter.com/share?url=" + data:post.url + "&title=" + data:post.title' rel='nofollow' target='_blank' title='Tweet This'><img alt='Tweet This' border='0' height='25px' src='http://i1379.photobucket.com/albums/ah140/mynamesiram/Mobile%20Uploads/A036F9A7-1B42-42A6-9DF4-29FE498F231D_zpshfhfvks2.jpg' width='25px'/></a>
<a class='email' expr:href='"mailto:?subject=" + data:post.title + "&body=" + data:post.url' rel='nofollow' target='_blank' title='Share Via Email'><img alt='Share Via Email' border='0' height='25px' src='http://i1379.photobucket.com/albums/ah140/mynamesiram/Mobile%20Uploads/45AA973D-D8A1-4FAE-A31A-138DA7CB8443_zpsteklwczz.jpg' width='25px'/></a>
<a class='facebook' expr:href='"http://www.facebook.com/sharer.php?u=" + data:post.url + "&t=" + data:post.title' rel='nofollow' target='_blank' title='Share This On Facebook'><img alt='Facebook Share' border='0' height='25px' src='http://i1379.photobucket.com/albums/ah140/mynamesiram/Mobile%20Uploads/234A9CED-06E8-4D0B-8377-A64D92B082A1_zpsbexuli8g.jpg' width='25px'/></a>
<a class='comment-form' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick.com' title='comment-form'><img alt='comment-form' border='0' height='25px' src='http://i1379.photobucket.com/albums/ah140/mynamesiram/Mobile%20Uploads/F698C5CF-D64E-4C9D-B8DA-AC431C5B343E_zpsvpxnfbuv.jpg' width='25px'/></a>
</div></b:if>
The URL for my blog is as follows: http://www.blankesque.com
Upvotes: 1
Views: 132
Reputation: 186
Try moving your sharing buttons to the .post-footer
section. The read-more link cuts the .post-body
container and makes impossible to show them.
Upvotes: 1