Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I know pagination isn't as straight forward with WP_Query as it is with other loop types but normally I don't have a problem with it.

I'm editing a site for a client and this is their current loop;

<?php
    $temp_post = $post;
    $args = array(
        'ignore_sticky_posts' => 1,
        'posts_per_page' => 5,
        'post_type' => 'project'            
    );
    $projects = new WP_Query( $args );
    while ($projects->have_posts()) : $projects->the_post();
?>

    <!-- loop content -->

<?php
    endwhile;
    kriesi_pagination();
    $post = $temp_post;
?>

I tried my usual method of using $wp_query instead of $portfolio but that didn't work.

Anyone have any ideas?

share|improve this question
add comment

1 Answer

I think you have to add page or paged argument to your WP_Query. Take a look at WP_Query Pagination Parameters.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.