WordPress.org

Ready to get started?Download WordPress

Forums

Pagination question (9 posts)

  1. ThorHammer
    Member
    Posted 4 years ago #

    In one of my projects I am using a page as default homepage. Here I list the last 50 posts, just their title and a thumbnail in 3 columns.
    My quesion regards the pagination. When choosing "next" the user gets one single "listing" -thumbnail and title. I would like the "next" to become another page with the following 50 posts. And so on...
    How to best achieve this with dynamic pagination? Is it possible?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    What custom query are you using in this page? I'm assuming it is index.php, yes?

  3. ThorHammer
    Member
    Posted 4 years ago #

    Esmi, my oracle! I am querying posts from four categories and list them according to rating (GD star rating) popularity. The listing is done on a custom page template, not index.php.

  4. ThorHammer
    Member
    Posted 4 years ago #

    My main problem is that after the listing and when I press the "next" link, I only can display one and one listing. This is not what I want. I want the following 50 posts to be displayed. And this is where I have halted. I don't know how to advance from here. So any tip would be of great help.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Can you drop a copy of the template into the pastebin?

  6. ThorHammer
    Member
    Posted 4 years ago #

    Sure, esmi!

  7. ThorHammer
    Member
    Posted 4 years ago #

  8. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    This line:

    query_posts('cat=32,11,2,5&showposts=50&v_sortby=views&v_orderby=desc');

    What's v_sortby=views&v_orderby=desc? Is that from the rating plugin?

    Try:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('cat=32,11,2,5&posts_per_page=50&v_sortby=views&v_orderby=desc&paged=' . $paged);
  9. ThorHammer
    Member
    Posted 4 years ago #

    Thanks esmi, I will try when I get back home later today!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags