conditionals in wordpress

Posted by pablo on Stack Overflow See other posts from Stack Overflow or by pablo
Published on 2010-05-10T17:27:24Z Indexed on 2010/05/10 17:34 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

Why this code works fine:

<?php if (**is_page**('4')) { ?> 
<style type="text/css"> 
body {background-image:url("<?php bloginfo('template_url'); ?>/images/bac4.jpg");} 
</style> 
<?php } else ?> 

and this not:

<?php if (**is_category**()) { ?> 
<style type="text/css"> 
body {background-image:url("<?php bloginfo('template_url'); ?>/images/coaching.jpg");} 
</style> 
<?php } else ?> 

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about conditional