Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $the_query = new WP_Query( $args );
- if ( $the_query->have_posts() ) : ?>
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php echo '<p>' .$post->ID .'</p>';?>
- <?php endwhile; ?>
- <?php wp_reset_postdata(); ?>
- <?php else : ?>
- <p>No-data!</p>
- <?php endif; ?>
- $the_query->have_posts();
- $the_query->the_post();
- $the_query = new WP_Query( $args );
- if ( $the_query->have_posts() ) : ?>
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php echo '<p>' . get_the_ID() .'</p>';?>
- <?php endwhile; ?>
- <?php wp_reset_postdata(); ?>
- <?php else : ?>
- <p>No-data!</p>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement