Support » Themes and Templates » Pagination question

  • 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?

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    (@esmi)

    Forum Moderator

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

    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.

    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.

    esmi

    (@esmi)

    Forum Moderator

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

    Sure, esmi!

    esmi

    (@esmi)

    Forum Moderator

    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);

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Pagination question’ is closed to new replies.