I come with a basic question but I can not solve, I think that will be easy for you. I would like, if I have 2 or more post on loop, show the entire loop. I tried the following:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $portfolio = new WP_Query(array('post_type' => 'project', 'posts_per_page' => 12, 'paged' => $paged)); $count = 0; ?> <?php if ($portfolio < 2) : ?> [CONTENT LOOP] <?php if ($portfolio) : while ($portfolio->have_posts()) : $portfolio->the_post(); [/CONTENT LOOP] <?php endwhile; ?> <?php endif; ?> <?php endif; ?>
However, that didnt work, the single post still appearing. Like I said, if i have one post in the loop, will show nothing of the loop. Sorry for the question, is that I'm not very familiar with wordpress yet. Thank you!