Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirection when newest replies are at the top.

  • @jemar707

    Participant

    I have topics setup so that most recent replies appear at the top. I am having 2 problems with this in the case that the topic has multiple pages of replies.

    1st, after someone replies, it sends them to last page of replies which is the oldest reply. I’d like them to be directed to 1st page of topic.

    2nd, if someone clicks on bbp-topic-freshness-link from the forum page, it again, direct them to the last page of replies. Since I have newest replies in reverse order, this doesn’t make sense.

    Is there something I can do in these 2 cases to have users land on the 1st page of replies?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @jemar707

    Participant

    @robin-w

    Not sure if @ works here, but Robin seems to be the best BBPress Ninja I see and I am still having this problem. I searched for solutions again, but don’t see any.

    @robin-w

    Moderator

    @ works!

    I have topics setup so that most recent replies appear at the top.

    so first thing is I need to know how you did this?

    @jemar707

    Participant

    Hi Robin! Thanks for the reply.

    This is what I am using to reorder replies:

    // Reverse forum replies order from newer to older
     
    function custom_bbp_has_replies() {
    $args['order'] = 'DESC'; // ‘ASC’ (Ascending, Default), 'DESC' (Descending)
     
    return $args;
    }
     
    add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );
     
    function custom_bbp_show_lead_topic( $show_lead ) {
    $show_lead[] = 'true';
    return $show_lead;
    }
     
    add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );

    @jemar707

    Participant

    Hi @robin-w 🙂

    I know it’s been some time since I asked this question…but I am still stumped. If you have any ideas of what I can do to fix this, I’d be eternally grateful.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.