Pagination Not Working
-
Hey guys,
I am having an issue with pagination..
currently i am using a combination of buddypress and wordpress.. and to handle pagination a plugin called wp-pagenavi
it is working great at detecting how many posts per page, and how many pages it needs to create.. generating a list of links at the desired location on the page that link to MYDOMAIN.com/page/2/ etc. code is below:
<?php $my_query = new WP_Query( array( 'posts_per_page'=>5, 'author' => bp_displayed_user_id(), 'paged' => get_query_var('paged') ) ); ?> <?php if ( $my_query->have_posts() ) : ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> CONTENT <?php endwhile; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(array( 'query' => $my_query )); } ?> <?php endif; ?>
However, when i click on one of the links it redirects me back to the homepage… is there something i am missing that would do this??
Any help would be greatly appreciated, Thank you in advance!
haxxxton
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Pagination Not Working’ is closed to new replies.