Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Remove footer from specific posts (http://forum.bytesforall.com/showthread.php?t=4593)

jmdr Nov 24, 2009 10:42 AM

[SOLVED] Remove footer from specific posts
 
Is it possible to remove the post footer from specific posts on both multi- and single-post pages?

I use atahualpa for my photoblog and have customized it to include a link to purchase each image in the post footer. Occasionally, I write a post without a photo, and would like to remove that line (or the whole footer if need be) from those posts. These posts generally fall into a single category (or I could create a custom category or tag for these posts).

Thanks!
Jonathan

juggledad Nov 24, 2009 11:54 AM

you could put a php IF on the post footer area of 'The LOOP' so you would change
HTML Code:

<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
to
\
HTML Code:

<?php if (!in_category('5')) { bfa_post_footer('<div class="post-footer">','</div>'); } ?>
where category '5' is the category id of the things you dont want. I'd create a category called 'Do not display footer'

jmdr Nov 24, 2009 09:33 PM

Thanks Juggledad, that works almost perfect! Is there a way to exclude just a portion of the footer? (i.e. exclude my customization to the footers in the post/page info items on specific pages, rather than the excluding the whole footer)

'all the best

juggledad Nov 25, 2009 07:06 AM

You would have to go into the code to do that, hoiwever I have a suggestion. If you are not using it already, why not use the kicker or byline?

You could rearange 'THE LOOP' so the kicker comes just before the footer, then have the link for the ordering in it and use the php IF on it. Then you don't have to mess with the footer

jmdr Nov 25, 2009 11:35 AM

Of course--great suggestion, and I used the same php IF to exclude the kicker from specific posts. Thanks!


All times are GMT -6. The time now is 02:50 PM.

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