New answers tagged

0

tnx but These conditions must be checked if user have avatar (from upload in user panel) echo avatar img; else echo defualt avatar wordpress.


0

<?php $id = get_current_user_id(); // this is for the current user, for other user just change this variable to the user id intended $link = get_user_meta( $id, 'avatar', true ); ?> <img src="<?php echo $link ?>" alt=""> That is your answer, but if you want to understand it just continue reading!.. (only after writing ...


0

You can try to use 'manage_users_sortable_columns' filter handle instead. //Sort the Columns add_filter( 'manage_users_sortable_columns', 'sortable_users_column' ); function sortable_users_column( $sortable_columns ) { $sortable_columns[ 'last_login_column' ] = 'lastlogin'; } That's the proper one for the users admin screen.


0

I manage to filter the posts, this seems to be enough for this project function remove_notallowed_authors( $query ) { $user = wp_get_current_user(); if ( in_array( 'editor_group_role', (array) $user->roles ) ) { $user_ids = get_users( [ 'role' => 'user_role_that_posted', 'fields' => 'ID' ] ); ...


Top 50 recent answers are included