"Read More" tag won't work when using query_posts
-
I’m building a custom theme that has for a home page a static page that includes some static information and also shows the latest post. Here’s the code I’m using to grab and display the latest post:
<?php query_posts('showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <?php the_content('Read more...'); ?> <?php endwhile;?>
It works, but it displays the entire post rather than stopping at the <!–more–> tag and displaying a “read more” link. This forum post says that query_posts stops the pagination features and that the solution is found in this other post, but the other post does not make it clear how to solve this problem. Any suggestions for what code to change?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘"Read More" tag won't work when using query_posts’ is closed to new replies.