Display All Authors only

Use following code to get all users having role Author $args = array( ‘role’ => ‘author’, ‘number’ => ’10’, ); $authors = get_users( $args ); For all argument list refer this

Display Recent Posts in BuddyPress Profile

This is quite easy, because you can use author as a parameter with get_posts(). The following snippet retrieves the 5 latest posts by a specific user, whose ID you need to pass. $author_ID = bp_displayed_user_id(); $author_posts = get_posts(‘author=”.$author_ID.”&posts_per_page=5′ ); if($author_posts) { foreach ($author_posts as $author_post) { // do output like echo $author_post->post_title.'<br />’ } }

Display Authors Selectively

If I were you, I would avoid custom SQL if there are perfectly fine WordPress functions for your needs. Otherwise there’s a risk that you might leave vulnerabilities or backdoors to your database which might lead to complete loss/corruption of data in the future. Like any other query: the more arguments you use, the heavier … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)