• Hi!

    I would like to add numbered pagination for my blog listings. So Next / Previous would have “Previous 2, 3, 4… Next” as an example.

    I did some research:

    https://www.ads-software.com/support/topic/pagination-of-posts-in-page

    And…

    Pagination is enabled in the latest version, updated today. By default it will only do previous/next buttons, but the pagination portion can be changed using a filter hook (for more advanced php/WP devs).

    On the roadmap is an easy change from previous/next to do the paginate_links() function (which you can use the filter hook to change this to now).

    I would really like to get PageNavi hooked up to the filter hook? I’m not sure where that is though. Could you point me in the right direction?

    I found this

    public function output_posts() {
    		if ( !$this->args )
    			return '';
    		$page_posts = apply_filters( 'posts_in_page_results', new WP_Query( $this->args ) ); // New WP_Query object
    		$output = '';
    		if ( $page_posts->have_posts( ) ):
    			while ( $page_posts->have_posts( ) ):
    			$output .= self::add_template_part( $page_posts );
    			endwhile;
    			$output .= ( $this->args['paginate'] ) ? '<div class="pip-nav">' . apply_filters( 'posts_in_page_paginate',
    				$this->paginate_links( $page_posts )
    			) . '</div>' : '';
    		endif;
    		wp_reset_postdata( );
    		return $output;
    	}

    But not sure how to integrate wp_pagenavi into it hahaha.

    Any help would be greatly appreciated!

    Thank you.

    https://www.ads-software.com/plugins/posts-in-page/

  • The topic ‘Page Numbers with Paginate On!’ is closed to new replies.