I am creating a front page that will show snippets of my posts. I almost have it working right, but not quite. What I have is:
<?php $recent = new WP_Query(“cat=24&showposts=3”); while($recent->have_posts()) : $recent->the_post();?>
(This line is supposed to show the first three posts from category 24…almost works right. it shows 3 posts, but the first one is messed up… see below.) Then I have:
(Pulls up the title, etc… This works OK)
<?php the_content_limit(200, “”); ?>
(This line limits the number of characters in the snippet, and works fine)
What I get with the above query is:
The title of the last story posted in category 24 is fine (as the subject of the snippet), but the text of the snippet comes from my very last post (no matter what category it was put in)
After I get past this one glitch, all the other stories are fine. I just have the title/snippet problem. If anyone can help, I would appreciate it.
- The topic ‘WP Query and Snippet Problems…’ is closed to new replies.