Custom Post Query Error
-
Hi,
I’ve created a query to display custom posts by calling them from the category. And the issue is although I want to display 3 different posts in the post section, It only displays 1 same post for 3 each content section.
Here is the reference screenshot link for the issue.
$args = ( array( 'category_name' => 'sidepost', 'post_status' => 'publish', 'posts_per_page' => -1, 'order' => 'ASC', 'orderby' => 'date', ) ); // the query $the_query = new WP_Query( $args ); ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> // CUSTOM PHP & HTML CODE <?php endwhile; ?> <?php wp_reset_postdata(); ?>Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom Post Query Error’ is closed to new replies.