Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Comments, trackbacks & pings »

[SOLVED] Remove multiple comment footers per category


  #1  
Old Jan 7, 2010, 04:39 AM
WesleyTack
 
14 posts · Dec 2009
Send a message via MSN to WesleyTack
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!
  #2  
Old Jan 7, 2010, 05:10 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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>'); } ?>
you can ues the actual category names, so it could be
HTML Code:
<?php if (!in_category(array('Weather', 'News'))) { bfa_post_footer('<div class="post-footer">','</div>'); } ?>
the 'is_xxxxxx()' are all WordPress functions that can be found at http://codex.wordpress.org/Conditional_Tags
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jan 7, 2010, 08:28 AM
WesleyTack
 
14 posts · Dec 2009
Send a message via MSN to WesleyTack
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.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Categories, Multiple versions of Altahualpa Jaguwar Atahualpa 3 Wordpress theme 16 Apr 27, 2010 08:55 AM
remove background color of the comment box Glalax Comments, trackbacks & pings 1 Oct 25, 2009 10:51 AM
[SOLVED] Is there a way to show different footers on different pages? smcrjc Post-Kicker, -Byline & -Footer 2 Jul 18, 2009 03:43 AM
Category Templates multiple sidebars ranch2 Sidebars & Widgets 3 May 25, 2009 06:40 PM
Remove all comment functionality? blueprairie Forum How-To 4 Mar 26, 2009 01:09 PM


All times are GMT -6. The time now is 05:27 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.