Created
July 24, 2017 22:20
-
-
Save asterion/4e46a87ea68492f77c813e5e3892e0c7 to your computer and use it in GitHub Desktop.
prueba query_posts
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
<?php | |
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; | |
// The Query | |
query_posts( 'posts_per_page=3&paged=' . $paged ); | |
// The Loop | |
while ( have_posts() ) : the_post(); | |
echo ' | |
<li>'; | |
the_title(); | |
echo '</li> | |
'; | |
endwhile; | |
// Reset Query | |
wp_reset_query(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment