second loop to show excerpts
-
I have created a page template to show up to 10 posts from a specific category and some static text below that the hot buy posts. The hot buy posts should be excerpts. Instead of excerpts of the actual posts showing, I am getting the excerpt of the static text appearing multiple times.
Here is the link
Here is the code for the excerpt loop. I don’t know why the permalink and post title are bringing up the correct posts but the excerpt is from the page, not the posts.<?php $args = array( 'posts_per_page=>5', 'orderby' => 'ASC', 'category' => 137 ); $hotbuy_posts = get_posts( $args ); foreach( $hotbuy_posts as $post ) : ?> <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br /> <?php the_excerpt(); ?> </p> <?php endforeach; ?>
Any assistance is greatly appreciated.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘second loop to show excerpts’ is closed to new replies.