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

How to grab a specific page of content from paginated post?

nextpage pagination is a bit odd. You will have to parse the post content. This should do it. function get_nth_page($n=0,$content=””) { if (empty($content)) { global $post; $content = $post->post_content; } if (empty($content)) { return false; } $content = str_replace(“\n<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $content = str_replace(“\n<!–nextpage–>”, ‘<!–nextpage–>’, $content); $content = str_replace(“<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $pages = explode(‘<!–nextpage–>’, $content); … Read more

Edit format of Paginate_Links()

There is no clean way to do this (that I notice from quick look at rather messy code of it), but $n_display is passed though formatting number_format_i18n() function which does have a filter. So you could try something like: function make_number_into_dot( $number ) { return ‘o’; } add_filter( ‘number_format_i18n’, ‘make_number_into_dot’ ); // your pagination handling … Read more

Transient pagination not working properly

Short answer: You are making the same query no matter what page you are, but you’re expecting a different result. Long answer: The query should be different for second page, having paged=2, so your query (and transients) with pagination should look like this: $paged_var = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : 1; if … Read more

How to change title tags on paginated posts?

Is “WP SEO” = “WordPress SEO by Yoast”? If so, the plugin has some tags for you: %%page%% – Replaced with the current page number (i.e. page 2 of 4) %%pagetotal%% – Replaced with the current page total %%pagenumber%% – Replaced with the current page number Just look at the bottom of the page wp-admin/admin.php?page=wpseo_titles, … Read more

Two queries on the same page with pagination

Please use below code hope it’s work for you <div class=”row list-group”> <?php function query_group_by_filter($groupby){ global $wpdb; return $wpdb->postmeta . ‘.meta_value ‘; } global $paged, $wp_query, $wp; $args = wp_parse_args($wp->matched_query); if ( !empty ( $args[‘paged’] ) && 0 == $paged ) { $wp_query->set(‘paged’, $args[‘paged’]); $paged = $args[‘paged’]; } $temp = $wp_query; $wp_query= null; add_filter(‘posts_groupby’, ‘query_group_by_filter’); … Read more

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