How to Paginate within a Page (not Blog posts) (2 posts)

  1. Icyshard
    Posted 5 years ago #

    I am trying to use WP more as a CMS with blog posts reserved strictly for the blog section and pages created for each section/page of the site (your standard "about us", "work samples", etc.)

    I've searched all over but have not found a solution for my particular problem. I have a Portfolio section--the main page of the Portfolio Page is supposed to have thumbnails and titles of each of the work samples, and then when you click them they go to the subpages that I have created underneath the portfolio page.

    My question is: How do I output the entire list of subpages on the main portfolio page while including pagination?? In my case, we currently have about 21 different portfolio examples on subpages, but we only wish to show a maximum of 9 examples on the main page, and then paginate to page 2 for the next 9, etc. I know how to output an entire list of subpages, but I have not seen a way to paginate them.

    Also, I have come across plenty of plugins that paginate blog posts, but not pages, and currently I've resorted to using a method where I have manually entered all of the thumbnails and titles in the content of the Portfolio page and then paginated it manually using wp_link_pages and inserting the <!--nextpage--> tag where needed. However, this is obviously more labor-intensive and subject to error if ever links change or work samples are added or deleted.

    Anyone have any ideas??

  2. gerbilk
    Posted 5 years ago #

    use a category instead of a page, set the slug to whatever you want then create a template named category-X.php where X is the numeric ID of the category. use ACE to keep this out of the index or you can manually exclude it from your query.

Topic Closed

This topic has been closed to new replies.

About this Topic