很容易理解为什么您的代码只显示一篇文章-模板文件中没有循环,那么为什么它要显示多篇文章呢?
老实说它看起来更像单个帖子模板,而不像类别归档。。。
这应该更好一些(或者至少应该显示更多帖子):
<?php
get_header();
/**
* The template for displaying Category pages
*/
quality_breadcrumbs();
?>
<section id="section-block" class="site-content">
<div class="container">
<div class="row">
<!--Blog Posts-->
<?php echo \'<div class="col-md-\'.( !is_active_sidebar( "sidebar-primary" ) ?"12" :"8" ).\' col-xs-12">\'; ?>
<?php while ( have_posts() ) : the_post(); ?>
<article class="cat-post">
<figure class="cat-figure">
<?php $defalt_arg =array(\'class\' => "img-responsive"); ?>
<?php if(has_post_thumbnail()): ?>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail($defalt_arg); ?>
</a>
<?php endif; ?>
</figure>
<div>
<?php if($current_options[\'home_meta_section_settings\'] == \'\' ) {?>
<?php } ?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</header>
<div class="entry-content">
<?php the_excerpt(__(\'Read More\',\'quality\')); ?>
<?php if($current_options[\'home_meta_section_settings\'] == \'\' ) { ?>
<span class="entry-meta">
<?php $cat_list = get_the_category_list();
if(!empty($cat_list)) {
?>
<span class="author-image"> <?php echo \' \';?><a href="<?php echo get_author_posts_url( get_the_author_meta( \'ID\' ) );?>"><?php echo get_the_author();?></a> |</span><span class="cat-links"><?php _e(\'\',\'quality\');?><a href="<?php the_permalink(); ?>"><?php the_category(\' \'); ?></a></span> | <a class="entry-date" href="<?php echo get_month_link(get_post_time(\'Y\'),get_post_time(\'m\')); ?>"> <?php echo get_the_date(\'M j, Y\'); ?></a>
<?php } ?>
</span>
<?php } ?>
</div>
</article>
<?php endwhile; ?>
<?php wp_link_pages();?>
<!--/Blog Content-->
<?php comments_template(\'\',true); ?>
</div>
<?php get_sidebar(); ?>
</div>
</section>
<?php get_footer(); ?>