I was able to do this by editing
plugins/bp-messages/bp-messages/bp-messages-classes.php LINE 83
date_sent” . $order,
to
date_sent DESC”,
—————
I tried copying the file to my child theme so it wont break when I update BP. It didn’t work. Is it even possible to do this with that file?
You can’t override core files.
Undo the changes you made to /bp-messages-classes.php
Copy
bp-templates\bp-legacy\buddypress\members\single\messages\single.php
to your child theme so that the dir structure looks like this:
your-theme\buddypress\members\single\messages\single.php
Then in single.php, change
if ( bp_thread_has_messages() ) :
to
<?php
$args = array(
'order' => 'DESC'
);
if ( bp_thread_has_messages( $args ) ) : ?>
Thank you! Works great.
The only issue I’ve noticed is now in my message list, the subject field shows a “Re:” for every time its been replied to. Before this change, it only showed one.
So, I suppose what’s going on is that its also sorting the threads for each message for the inbox too and using the subject from the last thread. How can I isolate this so it only sorts it DESC when you’re view the message and not in your inbox?