WordPress Query filters

<?php $the_query = new WP_Query( array('post_type' => 'Fotod', 'posts_per_page=2') ); ?> Posts per page maybe doesn't work with this code. <?php $the_query = new WP_Query( array('post_type' => 'Fotod', 'category_name' => 'Esiletoodud') ); ?> <?php $count = 0; while ($the_query -> have_posts()) : $the_query -> the_post(); $count++; ?> <?php if ( $count == 1 ) { ?> <?php } ?> <?php endwhile; wp_reset_postdata(); ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.