I have a ‘page’ with a second loop that (should) show excerpts of posts in the category having the same name as the page. That’s working correctly, except that it always pulls an automatic excerpt, and never a manually entered excerpt. I’ve triple-checked that some of the posts on my test page do in fact have manual excerpts (I made them very different from the automatic one to avoid confustion) they’re just never showing up. The automatic one is showing up beautifully.
Here is the code:
<?php $thispage = $posts->post_name; /*name of page calling the template*/ ?>
[NORMAL PAGE DISPLAY:]
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(__('(more...)')); ?> <?php endwhile; else: ?> <?php wp_reset_query(); ?> <p><?php _e('Page Temporarily Unavailable.'); ?></p> <?php endif; ?>
[STATIC HTML HERE]
<?php query_posts( array ( 'category_name' => $thispage, 'posts_per_page' => -1 ) ); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
[DISPLAY STUFF HERE]
<div class="storycontent"> <?php the_excerpt(); ?> </div>
[RIGHT UP THERE — WHAT’S WRONG?]
‘<?php endwhile; else: ?>
<?php wp_reset_query(); ?>`
There ARE manual excerpts – -not sure how to reproduce that here. I entered them by turning on the excerpt box and adding them to posts (not pages) that display on my test pages. I made sure they were saved by leaving the post form and then coming back — there they are, but they don’t show up on the page.
If it helps, the page is here: http://litsam.com/writers/
It’s under development, so may be in a state of flux.
- The topic ‘the_excerpt() not showing manual excerpt’ is closed to new replies.