Last active
January 14, 2020 21:11
-
-
Save anandkumar/6310225 to your computer and use it in GitHub Desktop.
bbPress: Reverse forum replies order from newer to older
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much for this. It worked perfectly. I only have 1 comment/request...
How do I get actual replies to comments (when someone clicks on reply to a comment) to show above the comment instead of below it? Right now all the comments go newest to last but the reply to the comment will show indented below the comment the reply is to. Does that make sense? It makes the whole flow semi-out of order, LOL. Just a pet peeve.