自定义循环查询示例
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义循环查询示例相关的知识,希望对你有一定的参考价值。
the above url has some helpful parameters
<?php if ($my_query->have_posts()) : ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3><?php the_title(); ?></h3> <div class="entry"> <?php the_content("Continue reading " . the_title('', '', false)); ?> </div> <?php comments_template(); ?> <?php endwhile; ?> <div class="navigation"> <div class="left"><?php previous_post_link('« Previous Posts'); ?></div> <div class="right"><?php previous_posts_link('Next Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
以上是关于自定义循环查询示例的主要内容,如果未能解决你的问题,请参考以下文章