WP-PageNavi is showing the first page only

In case of wp_query, you can’t use shortcode this way <?php wp_pagenavi(); ?> You need to use variable (in which you are storing wp_query) in array inside shortcode. Use shortcode like this instead. Replace above shortcode with below one. <?php wp_pagenavi( array( ‘query’ => $query_slider ) ); ?> UPDATE This is a way in which … Read more

Pagination is not working on single-{slug}.php but works fine on page-{slug}.php

You forgot to start a new query. And if you dont use have post on your custom query, you will get the main current query, in your case is your single. $args = array( ‘post_type’ => ‘crew’, ‘posts_per_page’ => 10 ); $your_custom_query = new WP_Query( $args ); // is that you forgot // The Loop … Read more

Page navigation doesn’t show when query category

I found a partial workaround. Since the query object in the index.php is the right one I transferred it using serialize to template of choice, in this case category-video.php. In index.php i put on top <?php $s = serialize($wp_query); file_put_contents(‘query’,$s); ?> and in category-video.php I put <?php $u = file_get_contents(‘query’); $wp_the_query = unserialize($u); ?> It’s … Read more

Pagenavi pagination via wp-query in functions.php showing same content for each page

Finally solved this with: function my_filter_where( $where=”” ) { global $wp_query; if (is_array($wp_query->query_vars[‘post_status’])) { if (in_array(‘future’,$wp_query->query_vars[‘post_status’])) { // posts today into the future $where .= ” AND post_date > ‘” . date(‘Y-m-d’, strtotime(‘now’)) . “‘”; } } return $where; } add_filter( ‘posts_where’, ‘my_filter_where’ ); And: <?php $wp_query = array( ‘post__not_in’ => array(4269), ‘paged’ => get_query_var(‘paged’), … Read more

WP-PageNavi gives me a 404 when using WP Query

This could be a plugin compatibility problem. Have you tried to disable all plugins and see if that solves the problem? I found this which may also be of help: http://dre.im/if-pages-return-a-404-after-wordpress-3-1-upgrade/ Log in to wp-admin and go to permalinks, click save (this should refresh your permalinks). Check to see if this fixes your permalinks. If … Read more

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