我有在子目錄中顯示主站點上的靜態索引頁上的最後一篇文章的博客。顯示上一頁/下一篇文章鏈接不起作用
主要場所 - >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>