WordPress.org

Ready to get started?Download WordPress

Forums

Previous and Next Post link to navigate custom posts of a given taxonomy (3 posts)

  1. ameraz
    Member
    Posted 1 year ago #

    How would you manage to make the previous_post_link(); & next_post_link(); navigate custom posts under a given custom post type term?

    In the way it does to navigate posts Within the Same Category.

    Lets say that you have the Custom Post Type "Catalog" with attached custom taxonomy "Products" which has the terms "Oranges" and "Pears"

    So, while you navigate any Orange post in single view, the previous_post_link(); & next_post_link(); functions would only return previous and next post whithin same term "Oranges".

    Any help would be very much appreciated.

  2. manishkrag
    Member
    Posted 1 year ago #

    Hi ameraz,
    Please read the following links, I am sure you will success to get your requirement :)
    http://codex.wordpress.org/Template_Tags/next_post_link
    http://codex.wordpress.org/Function_Reference/previous_post_link

    Thanks
    M

  3. ameraz
    Member
    Posted 1 year ago #

    Hey Manish,
    thank you for bothering, but I've already read the documentation and as far as I can tell there's no function to acomplish what I need.

    Neither of those functions you posted work to navigate only in custom post type taxonomies...

    The best I came across so far is this:
    http://wordpress.org/extend/plugins/previous-and-next-post-in-same-taxonomy/
    ... but I would love to get the code snipet instead of using a pulgin.

    There's also something going on in here about the same functionality I'm looking for:
    http://core.trac.wordpress.org/ticket/17807

Topic Closed

This topic has been closed to new replies.

About this Topic