WordPress Load more posts by ajax not working
WordPress Load more posts by ajax not working
WordPress Load more posts by ajax not working
I’ve run into this problem with PageNavi before. My solution is to hijack the $wp_query variable temporarily and then reassign it after closing the loop. An exmaple: <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args=array( ‘post_type’=>’post’, ‘cat’ => 6, ‘posts_per_page’ => 5, ‘paged’=>$paged ); $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query($args); /* … Read more
Well this seems to fix it. Not sure if this is the best way to do it so please enlighten me if I’m wrong: By changing: if ( $wp_rewrite->using_permalinks() ) $pagination[‘base’] = user_trailingslashit( trailingslashit( remove_query_arg( ‘s’, get_pagenum_link( 1 ) ) ) . ‘page/%#%/’, ‘paged’ ); to: if ( $wp_rewrite->using_permalinks() ) $_SERVER[‘REQUEST_URI’] = user_trailingslashit( trailingslashit( remove_query_arg( … Read more
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
This is perfectly normal. When you set a page as front page WordPress thinks that you want to use the home url for it. Said that, the url for your calientes page will be your home url (http://domain.com). Now, front pages are not intened to use pagination, so if you put /page/{number} on a fron … Read more
One issue at least: you’ll want to close the loop before outputting your pagination links, or else they’ll be output on every iteration of the loop. But you’ve got paginate_links() before endwhile;. Try this arrangement instead: // open loop if ( have_posts() ) : while ( have_posts() ) : the_post(); // Loop markup // close … Read more
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
Using pagination with specific custom post type [duplicate]
You don’t need a custom rewrite rule to handle this, just set your taxonomy rewrite slug like: ‘rewrite’ => array( ‘slug’ => ‘projects/category/%project_cat%’ )
i think that you need to use wp_reset_query(); before woo_loop_after();