I’m polishing up a new theme that shows a single post in full, followed by five excerpts. My code goes something like this
query_posts (posts_per_page = 1) if have_posts while have_posts the_post -- do single-post stuff - global $post $myposts = get_posts('numberposts=5&offset=1') foreach($myposts as $post) : -- do recent-excerpt stuff endforeach endwhile else -- 404 stuff endif
So here’s the weird part: if I’ve explicitly written excerpt text for the excerpted entries, they appear correctly. If I do not, then I get clipped text from the most recent entry (that is, the one being shown in full).
There may be a better way to organize all this, and I’d appreciate any guidance on restructuring the whole latest-post/excerpted-post stuff.
- The topic ‘Bug in handling of the_excerpt?’ is closed to new replies.