On my category pages, I want to show one full post and then the rest of the list as excerpts.
I tried creating a variable which I called $full_content:
// CHANGE WHAT GETS EXCERPTS
$full_content = false;
function childtheme_content($content) {
if ($full_content) {
$content= 'full';
} elseif (is_home() || is_front_page()) {
$content= 'excerpt';
} elseif (is_single()) {
$content = 'full';
} elseif (is_tag()) {
$content = 'excerpt';
} elseif (is_search()) {
$content = 'excerpt';
} elseif (is_category()) {
$content = 'excerpt';
} elseif (is_author()) {
$content = 'excerpt';
} elseif (is_archive()) {
$content = 'excerpt';
}
return $content;
}
add_filter('thematic_content', 'childtheme_content');
and then using that variable in the categoryloop:
// The Category Pages
function childtheme_categoryloop() {
$count = 0;
while (have_posts()) : the_post();
$count++;
if ($count <= 1) { ?>
<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
<?php thematic_postheader(); ?>
<div class="entry-content">
<?php $full_content = true;
thematic_content();
$full_content = false; ?>
</div>
<?php thematic_postfooter(); ?>
</div><!-- .post -->
<?php } else {
?>
<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
<?php thematic_postheader(); ?>
<div class="entry-content">
<?php
$full_content = false;
thematic_content(); ?>
</div>
<?php thematic_postfooter(); ?>
</div><!-- .post -->
<?php } ?>
<?php endwhile;
$full_content = false;
}
add_action('thematic_categoryloop', 'childtheme_categoryloop');
I could see my changes to the loop, but no matter how I mess with this the category pages only show all-full, or all-excerpt. I have tested and the childtheme_categoryloop *can* definitely pull in different content for the if/else loop (if I use plaintext).
Any help is VERY much appreciated!! Thanks!
Michelle