WordPress query_posts() -
hello im new wordpress , styled elements, , had recent posts in them . question, can have them 5 posts repeated after each other ? :)
<div id="main_content"> <h2>latest products</h2> <div class="latest_products"> <div class="group"> <?php query_posts("post_per_page=1"); the_post(); ?> <h3 class="stick_note"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <div class="pro_content"> <div class="product_thumbnail"> <?php the_post_thumbnail('thumbnail'); ?> </div> <p><?php the_excerpt(); ?></p> </div> </div> </div> <!-- end latest products --> </div> <!-- end main content -->
you forgot implement the loop (click detailed info).
a full wordpress loop follows:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...render post here, keep repeating... <?php endwhile; else: ?> <p>sorry, no posts matched criteria.</p> <?php endif; ?> since don't have actual loop implemented can render 1 post.
Comments
Post a Comment