WordPress Posts, Pages and pagination

Chewing on WordPress.

While rummaging through the WordPress theme code I stumbled upon this vague function call ‘link_pages()‘. Not knowing what is was or did, I looked it up in the documentation. And it seems that WordPress can paginate (lengthy) posts out-of-the-box. Great! But while the difference between a post and a page can be confusing for WordPress starters, adding pagination to the equation may be too much. 🙂

That’s why it probably is somewhat hidden. (Or should I have read the manual?) Nonetheless, for people prone to write elaborate posts it could come in handy. All you need to do is add the following magic code in your post, <!--nextpage-->, and your off. Notice the pages links below.

, , ,

15 responses to “WordPress Posts, Pages and pagination”

  1. […] Ho scoperto quasi per caso che WordPress supporta “out of the box” la possibilità di paginare un post piuttosto lungo. Non che sia una necessita’ impellente (a meno di non voler provare a raddoppiare il numero di page view quasi per incanto…) ma e’ divertente. Il trucco consiste nell’inserire la parola magica <!–more–> nel punto in cui si vuole l’interruzione del testo. Se funziona lo si vede qua. Il suggerimento mi e’ arrivato via Think Lemon, anche se con riferimento al quicktag <!–nextpage–>. […]

  2. […] Buscando una manera de paginar en WordPress porque en ocasiones me parece mas practico que la paginacion se presente 1 2 3 4 .. en vez de “pagina anterior – pagina siguiente”, me encontre este post WordPress Posts, Pages and pagination entiendase Post WordPress, paginas y paginacion, el cual daba un tip muy simple: si quieres paginar tu post (articulo), simplemente donde quieras paginar inserta la etiqueta […]

  3. WordPress Pagination Plugin For SEO…

    How well are your older posts being crawled by search engines?
    If your blog contains hundreds or thousands of posts you could be in DEEP trouble.
    Pagination will place your older posts deeper and deeper in your directory. Several layers or several doze…

  4. sorry to re-open an year old post but next-page tag works even in the home page, all you have to do is to put in the index.php or home.php the code:

    <?php link_pages(); ?>

    PS: i was searching something about wordpress pagination and i found your post 🙂

  5. Thanks a lot!
    I’m writing just the lengthy articles you mentioned. BTW, I landed on this page from the “wordpress pagination” phrase on Google. Good seo 😛

  6. I have been scouring the web for this answer and all I got was pages of coding. Yours was sooo simple. Thank you!!!!!!!!!

  7. I’ve got a problem: sometimes my posts are splitted, but the pagination menu is not shown. I am using , and pages really exist, but “1 2 3 ” is not shown. What could be the problem?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.