【发布时间】:2013-01-12 15:52:59
【问题描述】:
我的问题与This other stack post 完全相同。我怎么无法弄清楚回复者的意思。我已经在我的自定义循环中尝试了他们的示例,它看起来与 OP 相同,但是分页不起作用。它不显示。
我在这个循环中也有这个问题:
$attr = array(
'align' => 'left',
'class' => 'thumbnail imageRight',
'width' => 350,
'height' => 350
);
if(have_posts()){
while(have_posts()){
the_post();
?>
<div class="post">
<?php the_post_thumbnail('medium', $attr); ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<p><?php the_excerpt(); ?></p>
</div>
<?php
}
next_posts_link('« Older Entries');
previous_posts_link('Newer Entries »');
}
分页根本不会显示,如果我在上方和下方回显某些内容,我会看到回显的文本 obv,但我看不到分页链接....
我已将 WP 设置为每页显示 3 个帖子,并且我在数据库中有超过 45 个帖子。
【问题讨论】:
标签: php wordpress pagination wordpress-theming