Just do a select query to the wordpress database. and echo the results.
// Query
global $wpdb;
$rows = $wpdb->get_results("
SELECT id, display_name
FROM " . $wpdb->prefix . "users
ORDER BY id DESC LIMIT 20"
);
// Show 'em...
foreach($rows as $row):
echo $row->display_name;
endforeach;
Just change limit, to how many you want to display and DESC to ASC for order.
Enjoy, my last post!
@aljo1985
WP provides a function for getting users. No need for custom sql.
https://codex.wordpress.org/Function_Reference/get_users
@xidea
Have you tried
bp_has_members( bp_ajax_querystring( 'members' ) . '&type=newest' )
Members Loop
Thanks for the info, I am actually new to WordPress and have not looked through all the functions. I have only built custom queries on custom tables on my own website that I am currently developing.
I have tried wordpress in the past but then switched to other platforms as they was more adequate for my goals.
But right now I am sticking with wordpress and building a new website :),
I’m more use to sources and templates, scripting from scratch.
Out of curiosity, which one is better on performance? A straight up query OR the function above.
If there is security concerns with using a query, apart from sanitisation which I know and use on every custom table, then that info would be good to know also.
Thanks.
Edit, I would like to report a bug in your software, even though you posted this reply I got a notification for a reply in the first topic I made. I had no idea you replied to this other than looking through the latest list of topics.
Here is a screen shot
target=”_blank”>https://i.imgur.com/wxSgfsG.png
Here is the topic in question that I got the notification for which only has 1 reply, but was from other topics.
https://buddypress.org/support/topic/how-do-i-remove-textarea-resize-without-editing-the-js-script/?action=bbp_mark_read&topic_id=236164&_wpnonce=d849ee20f9#post-236164