WordPress.org

Ready to get started?Download WordPress

Ideas

extend get_previous_post > get_previous_posts & next as well

  1. 2046
    Member

    Hello
    It would be awesome if you extend the function "get_previous_post"&"get_next_post" so that we can get more then one in both directions with possibility to chose what to show.
    Thanks to such function we can create more sophisticated navigation through the web. Instead using text based link to who knows what there will be a chance to see a image form "x" prev-next posts, or names, or meta, with excerpt, whatever.
    The way how it is now, the text based (link) system is not satisfactory anymore.

    thanks for considering..

    Posted: 4 years ago #
  2. pablogt
    Member

    12345

    Yes, on top of that, when a post is in multiple categories, this stars jumping from oune cat to the next, there should be a way to make so it stays in the categorie from which the next post navigation started.

    Posted: 4 years ago #
  3. Tim Nicholson
    Member

    12345

    Agreed, the previous/next post function is pretty worthless when you are viewing a category or tag or anything other than the entire set of posts.

    Posted: 4 years ago #
  4. Michael Fields
    Themer

    12345

    I would like to see this function extended to allow for easy navigation for taxonomies as well....

    Posted: 4 years ago #
  5. Ben Huson
    Member

    12345

    @pablogt You can already restrict get_previous_post to getting the previous post in the same category - just pass a parameter 'true':

    <?php get_previous_post( true ); ?>

    Posted: 4 years ago #
  6. mattcoxx
    Member

    @ Ben Huson
    Thanks a lot for your idea, incredible how solution can be sometimes easy : )

    Posted: 3 years ago #
  7. betclic
    Member

    Thank you very much for that idea, your solution helped me very well

    Posted: 3 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    10 Votes
  • Status

    This idea is under consideration