Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   Display only one category page as excerpts (http://forum.bytesforall.com/showthread.php?t=4252)

adelante Nov 6, 2009 05:04 PM

Display only one category page as excerpts
 
I need to display all category pages as full posts, except a pair of them which I need to display as excerpts.

I think it maybe somehow done using "Style & edit CENTER COLUMN", but dont know how.

juggledad Nov 7, 2009 08:56 AM

If you control weither to display the full post or an excerpt at 'ATO->Configure EXCERPTS -> Posts or excerpts on CATEGORY pages?

If you want a couple category to display only the heading, you will need to add a 'if (!is_category('9') AND (!is_category('11')) around the bfa_post_bodycopy() at ATO->Style & edit CENTER COLUMN-> The LOOP

adelante Nov 8, 2009 04:58 AM

but other (than theese two) categories I need to display as full posts, thats why I can't toggle "Posts or excerpts on CATEGORY pages?" to "excerpts only".

juggledad Nov 8, 2009 05:40 AM

right, that's why you use the if statement.
'if (!is_category('9') AND (!is_category('11')) notice the "!'? In PHP that stands for NOT, so this statement says ' If NOT category 9 AND not category 11 then display the post body' so if it is category 12, than 'NOT category 9' is TRUE and 'not category 11' is TRUE so the post body is displayed.

There may be issues if a post is in both category 9 and 12....so if you have posts with both, you may need to change the if a bit.

adelante Nov 9, 2009 12:36 PM

I've got the idea, but when I do what you say, I got no post_bodycopy at all.
What I have in my LOOP:

<?php if (!is_category('33') AND (!is_category('25')) { bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>');} ?>

juggledad Nov 9, 2009 04:21 PM

I missed the need for the excerpt, so try this
HTML Code:

<?php if ((!is_category('33')) AND (!is_category('25')) ) { bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); }
else {                global $bfa_ata, $post;
                echo '<div class="post-bodycopy clearfix">';
                the_excerpt();
                echo '</div>'; }
?>



All times are GMT -6. The time now is 02:44 AM.

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