Loop within a Page
-
Hi gang,
I’ve created a new page on my site, and using the php-exec plugin, I am trying to re-call the WP loop, basically creating different “blogs” based on different “categories”.
So I am pulling in the loop and am having trouble understanding the loop I guess. The current page is here:
https://www.pathsatlanta.org/paths-blog/And the code in this page is below. Please let me know where I am going wrong:
<div class="postboxcontent"> <?php query_posts("showposts=5&cat=1,3,4,5"); // the query is required, even if blank. while (have_posts()): the_post(); // the WordPress Loop begins here global $more; // set $more to 0 in order to only get the first part of the post $more = 0; ?><h2><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2><?php the_content(); endwhile; // the WordPress Loop ends here ?> </div>
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Loop within a Page’ is closed to new replies.