Created
June 11, 2022 10:00
-
-
Save itcomindo/123ebd9c4bd6fe916152507ba9280ec5 to your computer and use it in GitHub Desktop.
basic_wp_query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="prq"> | |
<?php | |
# ARGUMEN START | |
$args = array ( | |
'post_type' => 'post', | |
'posts_per_page' => 5, | |
'order' => 'ASC' | |
); | |
#QUERY START | |
$query = new WP_Query($args); | |
#QUERY MEET | |
while($query->have_posts()) : $query->the_post(); | |
?> | |
<!-- DISPLAY START --> | |
<div class="itemq"> | |
<h5><?php the_title(); ?></h5> | |
</div> | |
<?php endwhile; wp_reset_query(); ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment