WordPress.org

Ready to get started?Download WordPress

Forums

Post Types Order
[resolved] Next Link For Last Record Does Not Go To First Record (3 posts)

  1. benners_
    Member
    Posted 12 months ago #

    When clicking the Next link on the last record for my custom post types (non-hierarchical) it does not go to first record but instead goes to the record with the next closest publish date to the last record.

    http://wordpress.org/extend/plugins/post-types-order/

  2. nsp-code
    Member
    Plugin Author

    Posted 12 months ago #

    The next / previous post link can create problems in certain scenarios as there aren't to many options to filter those 2 functions, i recommend to separate create a list of posts and extract next / previous one.
    Or if you own the Advanced Post Types Order you can use the previous_post_type_link() and next_post_type_links() which will return the exact order you specified for a given area (archive, category / term etc). You may want to check with the following links
    http://www.nsp-code.com/advanced-post-types-order-api/previous-post-link/
    http://www.nsp-code.com/advanced-post-types-order-api/next-post-link/
    http://www.nsp-code.com/advanced-post-types-order-api/get-adjacent-post/

  3. benners_
    Member
    Posted 11 months ago #

    Thanks for the reply. Not sure what you mean by

    create a list of posts and extract next / previous one

    could you clarify please? Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags