mercredi 20 avril 2016

PHP If function - OR

This code for WordPress when you visit the category page that is "Cheshire" it will show the weather widget but I also want it to show on "Cheshire Sport" without putting all the code in twice is there a simple way to use it for both?

<?php 
$current_category = single_cat_title("", false);
if ($current_category == "Cheshire"){
?>
<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>
<?php
}
else {
    echo "";
}
?>

Does anyone know an easy way to do this?

Aucun commentaire:

Enregistrer un commentaire