我有在子目录中显示主站点上的静态索引页上的最后一篇文章的博客。显示上一页/下一篇文章链接不起作用
主要场所 - >http://example.com 博客 - >http://example.com/wp
的博客文章正确显示在主网站,但我不能显示prev和next后/文章链接。这是我有什么,我想
<?php
define('WP_USE_THEMES', false);
require('wp/wp-blog-header.php');
$posts = get_posts('numberposts=1&order=ASC&orderby=post_title');
foreach ($posts as $post) : setup_postdata($post); ?>
<h1><?php the_title(); ?>
</h1><h2><?php the_date(); echo "<br />";?></h2>
<h3><?php the_content(); ?> </h3>
<div class="navigation"><p><?php posts_nav_link(); ?></p></div>
<?php endforeach; ?>
所以这是不可见的:<div class="navigation"><p><?php posts_nav_link(); ?></p></div>