Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to display all members in order to asc/desc by user id

@aljo1985

Participant

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!

Skip to toolbar