Support » Fixing WordPress » Using posts_nav_link with quirky loop

  • Hugo

    (@hugogpropellerse)


    I have items using a custom taxonomy which is why I’m using a custom loop like this:

    <?php
    $args = array( 'post_type' => 'produkter', 'posts_per_page' => 10 );
    		$loop = new WP_Query( $args );
    		if ( have_posts() ) :
    		while ( $loop->have_posts() ) : $loop->the_post();
    		?>

    Now, I’d like to use the posts_nav_link to paginate the results, but for some reason I can’t get it to work. It simply will not render any links. So is this because of my custom loop? Do I have to use a “vanilla” loop in order to be able to use posts_nav_link?

  • The topic ‘Using posts_nav_link with quirky loop’ is closed to new replies.