how can I get on WordPress only one of the weather widgets to show up depending on the category page the user is on.
<?php
if ($current_category == Cheshire)?>{
echo <div id="c_022b685c6534fb12881f4e5a78e6f32a" class="ancho">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center; width=100%">
<a href="http://ift.tt/1SZ4nUm" style="color: #000000; text-decoration: none; font: bold 13px/1.2 Verdana;">
The weather for Cheshire</a></h2>
<div id="w_022b685c6534fb12881f4e5a78e6f32a" class="ancho" style="height:100%"></div></div>
<script type="text/javascript" src="http://ift.tt/1SZ4nUo"></script>
}
if ($current_category == Cumbria)?>{
echo <div id="c_b5e9e66c4515d3c91adb4511543aaab0" class="ancho">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center; width=100%">
<a href="http://ift.tt/1SZ4nUq" style="color: #000000; text-decoration: none; font: bold 13px/1.2 Verdana;">The weather for Cumbria</a></h2><div id="w_b5e9e66c4515d3c91adb4511543aaab0" class="ancho" style="height:100%"></div></div>
<script type="text/javascript" src="http://ift.tt/1SZ4nUs"></script>
}
if ($current_category == Greater Manchester)?>{
echo <div id="c_a8d03c62bcc860b39aa47992fcd54ae5" class="ancho">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center; width=100%">
<a href="http://ift.tt/1SZ4pf4" style="color: #000000; text-decoration: none; font: bold 13px/1.2 Verdana;">
Weather Greater Manchester</a></h2><div id="w_a8d03c62bcc860b39aa47992fcd54ae5" class="ancho" style="height:100%"></div></div>
<script type="text/javascript" src="http://ift.tt/1SZ4pvj"></script>
}
if ($current_category == Lancashire)?>{
echo <div id="c_8fd3a3784f742d28d268d45af5391a20" class="ancho">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center; width=100%">
<a href="http://ift.tt/1SZ4pvn" style="color: #000000; text-decoration: none; font: bold 13px/1.2 Verdana;">The weather in Lancashire</a></h2>
<div id="w_8fd3a3784f742d28d268d45af5391a20" class="ancho" style="height:100%"></div></div>
<script type="text/javascript" src="http://ift.tt/1SZ4oaK"></script>
}
if ($current_category == Merseyside)?>{
echo <div id="c_42969f258646ac6c3f4e4a53ac5cfd36" class="ancho">
<h2 style="color: #000000; margin: 0 0 3px; padding: 2px; font: bold 13px/1.2 Verdana; text-align: center; width=100%">
<a href="http://ift.tt/1SZ4oaM" style="color: #000000; text-decoration: none; font: bold 13px/1.2 Verdana;">
The weather for Merseyside</a></h2>
<div id="w_42969f258646ac6c3f4e4a53ac5cfd36" class="ancho" style="height:100%"></div></div>
<script type="text/javascript" src="http://ift.tt/1SZ4pvr"></script>
else {
echo ""
}
}
?>
You can see what it currently looks like at http://ift.tt/1SZ4oaO
I want it to only load when on them pages no other category page that isn't a place? can anyone help, what have I done wrong?
Aucun commentaire:
Enregistrer un commentaire