Forums

Adding pagination to a custom query (2 posts)

  1. shaunwo2
    Member
    Posted 8 months ago #

    I've read through several different posts, and tried a few different methods (get_posts, get_results, WP_query) of pulling the appropriate sub-pages underneath this one: http://dev.daytoncvb.com/where-to-stay/

    I would like to display just 20 hotels per page, and then have some pagination options at the bottom of the list. Here's the code I have at the moment:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Ideas?

    Thanks,
    Shaun

  2. vtxyzzy
    Member
    Posted 8 months ago #

    This article shows how to use the WP function paginate_links():

    http://wordpress.mcdspot.com/2010/11/25/pagination-using-paginate_links/

Reply

You must log in to post.

About this Topic