samedi 5 décembre 2015

Blogger conditional Tags Dont Work

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 affect:

<b:if cond='data:blog.pageType != "static_page"'> The share button coding here </b:if>

I followed the instructions to this tutorial - http://ift.tt/1XQvT9f - very carefully and made absolute 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='&quot;https://twitter.com/share?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' rel='nofollow' target='_blank' title='Tweet This'><img alt='Tweet This' border='0' height='25px' src='http://ift.tt/1OF7LpN' width='25px'/></a>
<a class='email' expr:href='&quot;mailto:?subject=&quot; + data:post.title + &quot;&amp;body=&quot; + data:post.url' rel='nofollow' target='_blank' title='Share Via Email'><img alt='Share Via Email' border='0' height='25px' src='http://ift.tt/1XQvR1c' width='25px'/></a>
<a class='facebook' expr:href='&quot;http://ift.tt/KvaSOc; + data:post.url + &quot;&amp;t=&quot; + data:post.title' rel='nofollow' target='_blank' title='Share This On Facebook'><img alt='Facebook Share' border='0' height='25px' src='http://ift.tt/1XQvR1g' 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://ift.tt/1OF7LG3' width='25px'/></a>
  </div></b:if>

The URL for my blog is as follows: http://ift.tt/1LCaMqV

Aucun commentaire:

Enregistrer un commentaire