如何在类别页面中显示页码?

时间:2015-07-07 14:30:29

标签: pagination numbers generator categories

我的类别页面没有限制帖子编号的选项,也不允许对此页面进行分页。我尝试将生成分页的相应代码放在page.php中的查询帖子的其他位置,但没有工作:

<?php get_template_part( 'includes/pagination'); ?>

我尝试在此处插入此代码:

query_category)); ?&GT;  isset($ category)&amp;&amp; isset($ category-&gt; term_id)? $ category-&gt; term_id:0,&#39; orderby&#39; =&GT; &#39; ID&#39; )); ?&GT;
<?php foreach($cats as $cat): ?>                    
<?php query_posts( apply_filters( 'themify_query_posts_page_args', 'cat='.$cat->cat_ID.'&posts_per_page='.$themify->posts_per_page.'&paged='.$themify->paged.'&order='.$themify->order.'&orderby='.$themify->orderby ) );   ?>

                <?php if(have_posts()): ?>

                    <!-- category-section -->
                    <div class="category-section clearfix <?php echo $cat->slug; ?>-category">                         
                        <h3 class="category-section-title"><a href="<?php echo esc_url( get_category_link($cat->cat_ID) ); ?>" title="<?php _e('View more posts', 'themify'); ?>"><?php echo $cat->cat_name; ?></a></h3>

                        <!-- loops-wrapper -->
                        <div id="loops-wrapper" class="loops-wrapper <?php echo $themify->layout . ' ' . $themify->post_layout; ?>">                            
                        <?php while(have_posts()) : the_post(); ?>

                            <?php get_template_part('includes/loop', 'query'); ?>

                        <?php endwhile;?>
                        </div>
                        <!-- /loops-wrapper -->

0 个答案:

没有答案