Pagination breaks on child-categories, works fine on parent-category

I was finally able to get this working! Here’s how: What I had misunderstood (being a WP noob and all…) is that get_query_var(‘page’) is for pages, and get_query_var(‘paged’) is for posts. http://codex.wordpress.org/Function_Reference/get_query_varfor So I replaced these two lines $paged = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1; // FOR PAGINATION ‘page’ => $paged, // FOR PAGINATION with … Read more

How can i show pagenavi in my author.php?

If you’re using the WP-PageNavi plugin, there are several FAQs on using it with a secondary query loop: http://wordpress.org/plugins/wp-pagenavi/faq/ this code is from one of the pages linked from that FAQ: $my_query = new WP_Query( array( ‘tag’ => ‘foo’, ‘paged’ => get_query_var(‘paged’) ) ); while ( $my_query->have_posts() ) : $my_query->the_post(); the_title(); // more stuff here … Read more

Ussing page_navi with WP_Query

Just work including that code in the functions file: function mod_query($query){ $entradas = get_category_by_slug(‘anuncios’); if ((!is_admin() && $query->is_main_query())){ $query->set(‘posts_per_page’,”2″); $query->set(‘cat’,’8′); } } add_action(‘pre_get_posts’,’mod_query’); The file to show the content of the category is a normal file (without extra configuration) Thanks to @Pieter Groosen for the orientation.

Same posts from my homepage are on all of my different page

try to do the following in /layouts/default.php (and /layouts/blog.php): change the query line (line 5) to: wp_reset_query(); $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : (get_query_var(‘page’) ? get_query_var(‘page’) : 1 ); $the_query = new WP_Query(‘cat=-‘. $GLOBALS[ex_feat] . ‘,-‘ . $GLOBALS[ex_vid] . ‘&showposts=” . get_option(“woo_other_entries’) . ‘&orderby=post_date&order=desc&paged=’ . $paged); also add wp_reset_query(); before the line with wp_pagenavi(); make … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)