WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Selective next/prev_post_link - Coder highly needed! (3 posts)

  1. barmin
    Member
    Posted 7 years ago #

    I need someone to write a script/hack for me, please.

    If I've got a post within 2 categories, I need to be able to tell next_post_link() tag from which category to pick.

    I've been looking through the template-funcions-links.php, but I really wouldn't know what to do.

    ExcludedCategories parameter doesn't help, please don't suggest it.

  2. barmin
    Member
    Posted 7 years ago #

    I got it conceptualized. It should be like this:

    function next_post_by_cat($cat_id = '') {

    > get.category($cat).posts
    > get.current.post.date
    > select.next.post.by.date

    output

    }

    Easy, ain't it?

  3. Chris_K
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic