<?php get_header(); ?> <div id="handle"><a href="#" onclick="shelffx.toggle();return false;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/vrt.gif" alt="View Recent Ten Items" /></a></div>
<div id="shelf">
   <div id="inf">
   <div class="clr">&nbsp;</div>
   <div id="com">
<div class="tinfo">Commentors</div>
<ul>
   <?php get_tenrecentcomments(); ?>
</ul>
    </div>
    <div id="ent">
<div class="tinfo">Entries</div>
<ul>
   <?php query_posts('showposts=10');?>
   <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   <li><span class="intr"><?php echo zeroise($post->ID, 3); ?></span><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
<?php endwhile; endif; ?>
</ul>
    </div>
   <div class="clr">&nbsp;</div>
  </div>
<br /><br />
</div>    <div id="subc"> <?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>
<h1><?php edit_post_link('Edit','<span class="edit">','</span>'); ?><span class="id"><?php echo zeroise($post->ID, 3); ?></span><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
<h2>posted by <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y') ?></h2>

<div class="entry">
<?php the_content(); ?>
</div>

<div class="info"><span class="comm"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span> <strong>| Categorized:</strong> <?php the_category(', ') ?></div> <?php endwhile; ?> <div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></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; ?>    </div> </div><?php get_sidebar(); ?><?php get_footer(); ?>
-----------------------------------------------------------------
上面的代码生成页面后无法得到next_posts_link|previous_posts_link这两个翻页的链接.
请达人帮忙了.谢谢.

解决方案 »

  1.   

    你改成如下看看<?php   next_posts_link('&laquo;   Previous   Entries');   ?>
    <?php   previous_posts_link('Next   Entries   &raquo;');   ?>
    如果还不行的话,
    看下【next_posts_link】【previous_posts_link】这两个函数内部是咋个处理的!
      

  2.   

    previous_posts_link next_posts_link这些函数是如何处理的?看不到代码就不知道你那儿错了
      

  3.   

    看上去像是blog的模板,是wordpress么?