Hi
I’ve not used this plugin, but it sounds like it might do what you want.
http://wordpress.org/extend/plugins/post-teaser/
You would use it with a custom query loop at the bottom of the page. The plugin appears to override the default the_excerpt() code, so you activate it with the_excerpt() but its code runs instead – respects the <!-- more -->
tag
<?php
$catPosts = new WP_Query();
$catPosts->query(‘showposts=5&cat=5’); // use your cat ID code
while ($catPosts->have_posts()) : $catPosts->the_post(); ?>
<h3>” rel=”bookmark”><?php the_title(); ?></h3>
<?php the_excerpt();
endwhile; ?>
screwed up the code – should be this
<?php
$catPosts = new WP_Query();
$catPosts->query('showposts=5&cat=5'); // use your cat ID code
while ($catPosts->have_posts()) : $catPosts->the_post(); ?>
<h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt();
endwhile; ?>
Thread Starter
guided
(@guided)
Thanks stvwlf. I had given up on this, and was going to find a less satisfactory workaround. Your help got me to give it another go.
I’ve managed to get something resembling what I want, which, with a little styling, should be just about right.
I used a mixture of antistandard’s solution, found here, and a solution I found in the codex, here.
My code, placed after page.php’s <?php endwhile; endif; ?> looks like this:
<?php query_posts('cat=255');?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php
// Display content above the more tag
$more = 0;
the_content("More...");
?>
<?php endwhile; else: endif; ?>
Not sure if that’s the neatest way to do it, but it seems to work.
Thread Starter
guided
(@guided)
Oh, I should mention that I had to place the code below outside the loop.
<?php
// Declare global $more, before the loop.
global $more;
?>