• I did some work on a site with an archive page that displays way too much content so it loads too slowly. It should really be split up into a bunch of pages the way the categories display in most themes. I wanted to study how category pages do this so I could modify the page template.I have looked at a few category templates from different themes but I don’t see the code that does this. Is it in the core? Can some one point me to where to look for it?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s handled in WP_Query class’ get_posts() method. It’s declared in wp-includes/query.php. The pagination part is around line 3046. Essentially, the value of $paged and the option ‘posts_per_page’ are used to construct a LIMIT clause in the query.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding page breaks to long content archive’ is closed to new replies.