Change default members directory sorting
-
Hello,
In a website I’m working on, we need to change the members directory default sorting from “last active” to “newest”.
Currently, we’ve done it by creating a custom members-loop.php page and changing this string:<?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ): ?>
to
<?php $query = bp_ajax_querystring( 'members' ); if (strpos($query, "type=") === FALSE) { $query = "type=newest&".$query; } ?> <?php if ( bp_has_members( $query ) ) : ?>
This works, but it doesn’t change the dropdown in the top-right of the page. Is there a better way that changes the default sorting option and keeps the dropdown consistent?
Thank you in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.