Come attivare il paging su un Loop custom

<?php
$args = array(
‘post_type’ => ‘diconodinoi’,
‘orderby’ => ‘meta_value’,
‘meta_key’ => ‘wpcf-data’,
‘order’ => ‘DESC’,
‘showposts’ => 3,
‘paged’ => 1
);
$old_wpq = $wp_query;
$wp_query = null;
$wp_query = new WP_Query( $args );

while ($wp_query->have_posts()): ?>
<?php $wp_query->the_post() ?>
<?php endwhile;

posts_nav_link();
$wp_query = $old_wpq;

?>

 

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someoneDigg this
Pubblicato in Wordpress