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

How to break the wp_link_pages in two lines

You could potentially use the before, after, and separator arguments passed to wp_link_pages() to wrap each item in a span, then target the spans via CSS. Here’s your current code: wp_link_pages( ‘before=LQ &pagelink=Chapter %’ ); Converting to an array, because it’s easier to follow/manipulate: wp_link_pages( array( ‘before’ => ‘LQ ‘, ‘pagelink’ => ‘Chapter %’ ) … Read more

Custom pagination [duplicate]

I just have modified your code a little for adding pagination…. Here you go…. It will be your custom post type loop…. <?php if ( get_query_var(‘page’) ) { $paged = get_query_var(‘page’); } else if ( get_query_var(‘paged’) ) { $paged = get_query_var(‘paged’); } ?> <?php $LoopPortfolio = new WP_Query(array( ‘post_type’ => ‘portfolio’, ‘paged’=>$paged, ‘posts_per_page’ => ‘3’ … Read more

Pagination is not working on custom query inside a custom home page template

Use this for pagination <?php $paged = ( get_query_var( ‘paged’ ) ) ? absint( get_query_var( ‘paged’ ) ) : 1; $mostpopular_args=array( ‘post_type’ => ‘post’, ‘orderby’ => ‘meta_value_num’, ‘meta_key’ => ‘view_count’, ‘paged’ => $paged, ‘posts_per_page’ => ’10’, ); $wp_query = new WP_Query($mostpopular_args); while ($wp_query->have_posts()): $wp_query->the_post(); get_the_title(); endwhile; global $wp_query; $big = 999999999; // need an unlikely … Read more