在我的single.php WordPress博客中循环只返回一篇文章
嗨,我有一个wordpress博客,我把下面的代码放在侧栏的single.php页面中 代码与hompage侧栏中的代码相同> 此代码在hompage侧栏中正确运行,并返回到所有帖子 但是在single.php侧边栏中,只返回一篇文章在我的single.php WordPress博客中循环只返回一篇文章,php,loops,return,sidebar,Php,Loops,Return,Sidebar,嗨,我有一个wordpress博客,我把下面的代码放在侧栏的single.php页面中 代码与hompage侧栏中的代码相同> 此代码在hompage侧栏中正确运行,并返回到所有帖子 但是在single.php侧边栏中,只返回一篇文章 <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="new-posts-form"> <div cl
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="new-posts-form">
<div class="new-posts-img"><a href="<?php the_permalink(); ?>"></a><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(100,80)); ?></a></div>
<div class="new-posts-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
<div class="new-post-description"><?php content('11'); ?></div>
<div class="new-post-add-date-time"><img src="<?php bloginfo('template_url'); ?>/images/tb_clock.png" /><?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> : <?php the_category(', ') ?></div>
<?php endwhile; ?>
<?php endif; ?>
/图像/tb_clock.png“/>位于:
我认为在single.php页面上,您应该使用这个
参考请查收
我正在努力解决你的问题,希望这对你有所帮助
谢谢
anand在
single.php
中的single
应该会给你一个提示,为什么…:)