WP_Query Displays only the first post
-
Hello.
Can you tell me what is wrong with my code in my template for my testimonials post type — it only displays one and not all(30):
<?php
$query = new WP_Query( array(‘post_type’ => ‘testimonial’, ‘posts_per_page’ => 30 ) );
while ( $query->have_posts() ) : $query->the_post(); ?>Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WP_Query Displays only the first post’ is closed to new replies.