Last active
December 17, 2015 21:49
-
-
Save rodica-andronache/5677454 to your computer and use it in GitHub Desktop.
WORDPRESS - Navigare pagina cu posturi
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
$page = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array( | |
'paged' => $page, | |
... | |
); | |
query_posts( $args ); | |
if (have_posts()) : while (have_posts()) : the_post(); | |
... | |
afisare posturi | |
... | |
<?php endwhile; ?> | |
<div class="pagination"> | |
<div class="next"><?php previous_posts_link( __( 'Prev', 'cwp' ) ); ?></div> | |
<div class="prev"><?php next_posts_link( __( 'Next', 'cwp' ) ); ?></div> | |
</div><!-- /pagination--> | |
Obs: ca sa setez cate posturi sa fie afisate pe pagina, merg in wp-admin in Settings -> Reading |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment