Jump to content

How to show specific links for specific labels/categories


Kathrin9

Recommended Posts

I want to show for certain labels certain affiliate links in my blogspot blog. I have tried different varieties of the following code, but none worked. When I parse the code blogger shows all three affiliate links or none. My intention is that if I have the label "Familie/Family" it shows another affiliate link as if I have the label "Garten/Garden".

The code i've tried was:

<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:loop values='data:post.labels' var='label'><b:if cond='data:label.name == &quot;true&quot;'>
<b:if cond='data:label.name == "Familie"'>

<div style="clear:both; margin:10px 0;text-align:center">

<a href=Link 1>

</a>

<p class='text_werbung'>*)Anzeige</p>

</div>

<b:elseif cond='data:label.name == "Garten"'>

<div style="clear:both; margin:10px 0;text-align:center">

<a href=Link 2>

</a>

<p class='text_werbung'>*)Anzeige</p>

</div>

</b:else>
<b:if cond='data:label.name == "Food"'>

<div style="clear:both; margin:10px 0;text-align:center">

<a href=Link 3>

</a>

<p class='text_werbung'>*)Anzeige</p>

</div>

</b:if>

</b:if>

</b:if>

</b:loop>
<b:include data='post' name='post' />
</b:if>

Maybe anyone can help me to get that code working.

Thank you

Kathrin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...