Skip to content

Instantly share code, notes, and snippets.

@anandkumar
Last active January 14, 2020 21:11
Show Gist options
  • Save anandkumar/6310225 to your computer and use it in GitHub Desktop.
Save anandkumar/6310225 to your computer and use it in GitHub Desktop.
bbPress: Reverse forum replies order from newer to older
// 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' );
@merlynmac
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment