Select From wpdb – Author/User Directory page

You’re probably better off to use get_users which returns an array of <?php // get all users, regardless of roll. If you do need to restrict by // role you can use the `role` argument: get_users(array(‘role’ => ‘author’)); $uses = get_users(array(‘orderby’ => ‘nicename’)); foreach ($users as $user) { // do stuff with $user, will have … Read more

Display message depending on capability outside loop

Use global $authordata: Testing for roles: global $authordata; if ( in_array( ‘administrator’, $authordata->roles ) ) { echo ‘Hello Admin!’; } elseif ( in_array( ‘editor’, $authordata->roles ) ) { // echo something else } Or testing for capabilities: if ( ! empty ( $authordata->allcaps[‘manage_options’] ) ) { echo ‘The author can manage options’; } elseif ( … Read more

How can I get all author written content?

Your question is not very detailed or very clear but get_user_meta will return all of the user metadata for a user. That should have all of your fields. You could also use get_users for the second tab. I am not dealing with the first since you state that your “have no idea how to do … Read more

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