Forums

[Plugin: WP-PageNavi] Nav not showing up (1 post)

  1. brian914
    Member
    Posted 9 months ago #

    I am trying to pagination for blog post working and just can't seem to do it. I might have the code in the wrong place or are missing code somewhere, any help would be greatly appreciated. Below is what I have so far. I have the plugin installed and activated, and php 5.3.2 installed. The echo next to the wp_pagenavi() does get hit.

    Thanks a lot for any help!

    <?php
    	$query = array(
    		'post_type' => 'post'
    	);
    
    	$queryObject = new WP_Query($query);
    
    	if ($queryObject->have_posts()) {
    		while ($queryObject->have_posts()) {
    			$queryObject->the_post();
    
    			Add content here...
    		}
    	}
    	wp_reset_query();  // Restore global post data
    ?>
    
    <?php
    	if( function_exists('wp_pagenavi') )
    	{
    			wp_pagenavi();
    			echo 'test!';
    	}
    ?>

Reply

You must log in to post.

About this Topic