WordPress.org

Support

Support » Plugins and Hacks » WP-PageNavi » [Resolved] [Plugin: WP-PageNavi] Request page number as integer

[Resolved] [Plugin: WP-PageNavi] Request page number as integer

  • How would you get the page number currently being displayed? I need to display, say 10 posts per page (no problem) but the first two on the first page are to look different (no problem). But when I then open page 2, the first two posts on that page also look like the posts on page 1 (problem, as they aren’t to be featured, old news).

    How would i go about doing this? Have tried is_page() without solution, end of the working day as well so only a quick post. Used standard method for getting posts as on the wp-pagenavi website (not wordpress.org)

    ` $my_query = new WP_Query( array( ‘ID’ => $post_range, ‘order’ => ‘DESC’, ‘showposts’ => ’14’, ‘paged’ => get_query_var(‘paged’) ) );

    //the loop and more stuff
    //end loop

    wp_pagenavi( array( ‘query’ => $my_query ) );

    wp_reset_postdata(); // avoid errors further down the page

    http://wordpress.org/extend/plugins/wp-pagenavi/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author scribu

    @scribu

    You’re already using it: get_query_var('paged')

    Pffff you’re right, my bad, completely forgot that and tried to manipulate the pagination plugin… Good thing I can say it’s friday afternoon! 😉 Thx scribu

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: WP-PageNavi] Request page number as integer’ is closed to new replies.
Skip to toolbar