Pagenavi with archive page

It always displays the first page because you tell it to: ‘paged’ => ‘1’ 🙂 That said changing main query and especially pagination inside a template is inherently unreliable. For proper customization of such you should always be adjusting main query before template is ever reached via appropriate hooks, typically pre_get_posts.

Error 404 blog/page/2/

I guess you don’t need to target a taxonomy. You can use the code below: function query_change_function( $query ) { $query->set( ‘posts_per_page’, 5 ); } add_action(‘pre_get_posts’, ‘query_change_function’); You should wrap the $query->set( ‘posts_per_page’, 5 ); around with if ( ! is_admin() && is_home() ) {//the $query->set code} to avoid it changing to 5-posts everywhere.

Need help getting this page nav working correctly [closed]

You don’t have a code issue, just CSS. In your default.css, just at the end, add this: #menu-under-header .navbar-inner ul{clear:both !important; width:1000px;} .menu-header-container{clear:both !important;} #social-networking{clear:both !important;} and that’s it. You may want to add a position for social networking. IN that case, replace the last line with this: #social-networking{clear:both !important; position:relative; left:760px;} EDIT: SEE THE … Read more

Wp Pagenavi how to display all results

I replaced it with: $out .= $instance->get_single( 1, ‘first’, “All”, 100, 1 ); And I changed the get_single function, more exactly I added a parameter, “all”, and this one won’t afect anything else. function get_single( $page, $class, $raw_text, $format=”%PAGE_NUMBER%”, $all = 0 ) { if ( empty( $raw_text ) ) return ”; $text = str_replace( … Read more

pagenavi shows a lot of pages calculated from all posts in the site with query_posts

I didn’t load the plugin to check and I never use query_posts(), but perhaps tie_pagenavi() is depending on the value in the $paged global variable. Try adjusting that value before (or after) calling query_posts(). Here is the code to adjust it before calling query_posts(). if ( get_query_var( ‘paged’ ) ) // On a paged page. … Read more