Conditional category styling = PHP
Hi everyone !
I am so stuck with a conditional display in PHP. :confused: Could you please help to fix the following conditions: What I want to do (in a VBA way...) in the LOOP If category='uncategorised' then "Do not display KICKER" else If category='red' kicker background=red if category='blue' kicker background=blue The ultimate goal is to display a background image different per category in the KICKER only on the homepage and display nothing if no category. I've got this code but full a errors... Code:
<?php bfa_post_kicker( if (in_category('red')) |
you have to watch switching in and out of php/html. Your code should be in The LOOP and it should replace the line
HTML Code:
<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?> HTML Code:
<?php (if (in_category('red')) { ?> HTML Code:
div.post-kicker-red .post-kicker {background: red;} |
All times are GMT -6. The time now is 10:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.