I edit a template on WP. Faced the problem that posts are not completely removed from the portfolio category.
<?php if (have_posts()) : $count = 0; ?> <?php while (have_posts()) : the_post(); $count++; global $post; $taxo = wp_get_object_terms( get_the_ID(), 'portfoliocat');?> <!-- gallery item --> <li data-type="<?php foreach ($taxo as $taxx) { echo strtolower(preg_replace('/\s+/', '-', $taxx->slug)). ' '; } ?>" data-id="id-<?php the_ID(); ?>" class="view <?php foreach ($taxo as $taxx) { echo strtolower(preg_replace('/\s+/', '-', $taxx->slug)). ' '; } ?>"> <?php echo "count = $count"; ?> <?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'portfolio-bits','portfolio-bits' ); $large = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large', false); if(has_post_thumbnail()): echo '<img src="'.$thumbnail[0].'" alt="'.get_the_title().'"/>'; else: ?><img src="<?php bloginfo('template_url'); ?>/img/gallery_sample.jpg" alt="portfolio" /> <?php endif; ?> <div class="mask"> <h4><?php the_title(); ?></h4> <a class="info" href="<?php echo $large[0] ?>" data-rel="prettyPhoto"><?php _e('+','site5framework') ?></a> </div> </li> <!-- end gallery item --> <?php endwhile; endif; wp_reset_postdata();?> Namely, only 9 posts are displayed. What could be the problem?
Настройки->Чтение. To output a different number of posts, pass a parameter before theposts_per_pagewith the desired number. - Nik Horse