
我在wordpress的index.php写主循环,为什么每次都只显示一篇文章?
我明明发布了四五篇文章,想自己写php,主循环这么写:<?phpif(have_posts()):?><?php/*StarttheLoop*/?><?phpwhile(...
我明明发布了四五篇文章,想自己写php,主循环这么写:
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<script>alert("fdsds");</script>
<?php get_template_part( 'content'); ?>
<?php endwhile; ?>
<?php endif;?>
为什么每次只能显示一篇文章? 展开
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<script>alert("fdsds");</script>
<?php get_template_part( 'content'); ?>
<?php endwhile; ?>
<?php endif;?>
为什么每次只能显示一篇文章? 展开
展开全部
是设置→阅读→博客页面至多显示
设置成1了吗?
请补充。。。
设置成1了吗?
请补充。。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询