Wordpress - List all posts (with proper_pagination) -


on wordpress site i'm working on, lists posts category, after page lists posts (with pagination, showing 10 per page). how go achieving this?

thanks

you create new page template loop in it:

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'post', 'posts_per_page' => 10, 'paged' => $paged ); $wp_query = new wp_query($args); while ( have_posts() ) : the_post(); ?>     <h2><?php the_title() ?></h2> <?php endwhile; ?>  <!-- pagination links --> <?php next_posts_link( '&larr; older posts', $wp_query ->max_num_pages); ?> <?php previous_posts_link( 'newer posts &rarr;' ); ?> 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -