query only finds first 10 posts
-
I wrote a simple query (shown below) and for some reason it is only finding and showing the first 10 posts of type ‘album’ that exist. I even tried adding another post of type ‘album’ and it just started showing that one and 9 of the old ones.
<?php query_posts(array( // write the query by setting rules for the query in an array and putting it inside query_posts 'post_type' => 'album' ) ); ?> <div id="albums_container" class='row'> <?php while (have_posts()) : the_post(); ?> <?php $post = get_post(); ?> <!-- capture the current post with the $post variable --> <?php $ID = $post->ID;?> <!-- set $ID to the ID of the current post --> <div class="col-sm-12 col-md-4 col-lg-4 design album_container"> <img src="<?php the_field('cover_art'); ?>" /> </div> <?php endwhile;?> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘query only finds first 10 posts’ is closed to new replies.