WordPress.org

Ready to get started?Download WordPress

Forums

Custom-post-type pagination won't work.. (2 posts)

  1. thierry.eamon
    Member
    Posted 1 year ago #

    I'm working on a template which will use some custom-post-types & custom-taxonomies.. I'm having problems with pagination and duplicate posts.

    HOME.PHP
    LOOP #1
    On the homepage (home.php) I have 2 Loops. The fist one shows 1 post (custom post type: Projects) which has the custom-taxonomy "Featured" assigned to it.

    LOOP #2
    On the second loop I have the six most recent "Projects" (Custom post type) but I dont want a duplicate from the first loop. Under the six posts I'd like a pagination

    Both loops in home.php work.. but I still have that duplicate and I can't get pagination to work..

    PasteBin
    home.php
    featured.php
    functions.php

  2. thierry.eamon
    Member
    Posted 1 year ago #

    I just found out that if I set the posts per page in Settings > Reading to 6 posts.. the pagination works!! BUT that's not really a solution, the posts per page should be custom.

    Please guide me in the right direction..

Topic Closed

This topic has been closed to new replies.

About this Topic