Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sort reply by post date ASC

  • Dear all, I have a wordpress website and in website have a bbpress forum. I want comment in a topic of website sort by post date desc but reply in a topic of forum sort by post date asc.

    I was config “Setting -> Discussion: Comments should be displayed with the newer comments at the top of each page” and add filter:

    add_filter( 'bbp_has_replies_query', 'bbp_reverse_reply_order' );
    function bbp_reverse_reply_order( $query = array() ) {             
    
                // Bail if no query
    if ( empty( $query ) ) return;
    
                // Change the order
    $query = 'ASC';
    
                // Return the adjusted query
    return $query;
    }

    BBPress order reply when query the replies by post date asc but when paging the replies is sorted by post date desc on a page.

    Please help me resolved this issue. Thanks!

  • You must be logged in to reply to this topic.
Skip to toolbar