Documentation

How to use pagination

To add pagination to a list, place the [nav] shortcode inside your list template. By default it displays previous and next page links. It accepts two attributes:

  • type — how W4 Post List renders the pagination markup:
    • type="plain" — outputs plain <a> tags with nothing around them.
    • type="list" — wraps the pagination in a <ul> > <li> list.
  • ajax — set ajax=1 to load pages without reloading. AJAX fetches the next page’s content and replaces the current content. Leave it off and the list paginates with a query variable in the URL instead.

The query-variable method uses a slightly verbose URL parameter on purpose: it lets multiple lists on the same page paginate independently, without conflicting with one another.

See the template tags reference for the full set of [nav] attributes, including prev_text and next_text.