thanks esmi — well I am new at all this.. I have managed to get things working thanks to your advice. One of my main issues was that I was trying to make all this happen on a static page, so I read up on that stuff and it helped. Finally, I played around and poked and got things to work the way I wanted. Here is what I came up with – this is for a static homepage which displays categorized posts in different places on the page, with the more tag working and your ‘islast’ type test to help with display.
First, set the global $more variable at the top of the page, under the header include:
<?php global $more;?>
Then this will display the first looped content for my blog category, straight-forward enough, I just want to display the latest blog post here. Note how the ‘$more’ variable is referenced – this will be the same for all instances:
<?php query_posts('category_name=blog&showposts=1'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="title"><?php the_title(); ?></a><br />
<small><?php the_time('F jS, Y') ?></small>
<?php
$more = 0;
the_content("<b>Read More »</b>");
?>
<?php endwhile; else: endif; ?>
…And then to display may articles I did this:
<?php rewind_posts(); $c = 0; $toshow = 4; query_posts('category_name=articles'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( !in_category('6') && ($c < $toshow) ): ?>
<?php $c++; ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="title"><?php the_title(); ?></a><br />
<small><?php the_time('F jS, Y') ?></small>
<?php
$more = 0;
the_content("<b>Read More »</b>");
?>
<?php if($c < $toshow):?><hr /><?php endif; ?>
<?php endif; endwhile; else: endif; ?>
This has the “islast” logic (sorry I keep calling it that). I call a rewind_loop function before the query. I also had to reconstruct the logic of ‘showposts’ and ‘category_name’ so I could not display one category, but keep the counters working the way I wanted. I then have the one category I omitted here to display in yet another loop further down on the page, like so:
<?php rewind_posts(); $c = 1; query_posts('category_name=legislative&showposts=2'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="title"><?php the_title(); ?></a><br />
<small><?php the_time('F jS, Y') ?></small>
<?php
$more = 0;
the_content("<b>Read More »</b>");
?>
<?php if($c<3):?><hr /><?php endif;?>
<?php $c++; ?>
<?php endwhile; else: endif; ?>
Here I use the category_name and showposts normally, since I don’t have the constraints I needed for the previous loop.
I hope this is helpful to someone out there – took me a while to figure it out ?? If you have any improvements on syntax or logic, I’d be happy to hear.
thanks again esmi!