[SOLVED] Remove multiple comment footers per category
Hi,
I had a question about a thread that is closed, the thread in question is: http://forum.bytesforall.com/showthread.php?t=4623 There is a line there that works, but I want it to work on multiple categories: <?php if (!in_category('5')) { bfa_post_footer('<div class="post-footer">','</div>'); } ?> I was wondering if you can add more than one category to this? I tried making it: ('5', '6') but that doesn't work. I'm not sure if you CAN add more than one category? Thanks in advance! |
Yes you can use an array the code would be
HTML Code:
<?php if (!in_category(array('5', '6'))) { bfa_post_footer('<div class="post-footer">','</div>'); } ?> HTML Code:
<?php if (!in_category(array('Weather', 'News'))) { bfa_post_footer('<div class="post-footer">','</div>'); } ?> |
Oh, I forgot about the array code, being able to use the actual category names is a nice tip as well, good to know! Thanks for the quick response. Everything works now.
|
All times are GMT -6. The time now is 05:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.