我正在运行一些实际主题之外的模板文件,并在此模板上显示一些帖子。一切都很好,但几天前(可能是更新到4.5版),WordPress的默认设置开始覆盖我的posts_per_page=-1
我不知道为什么会这样。(未安装新插件)
<?php
// Include WordPress
define(\'WP_USE_THEMES\', false);
require(\'./../wp-blog-header.php\');
query_posts(\'tag=tagname&posts_per_page=-1\');
?>
<?php while (have_posts()): the_post(); ?>
<section class="in_tab">
<figure class="tab_fig">
<?php the_post_thumbnail(\'thumbnail\'); ?>
</figure>
<h2><?php the_title(); ?></h2>
<a class="insidelink" target="_blank" href="<?php the_permalink(); ?>" >Weiter...</a>
</section>
<?php endwhile; ?>