Amazing! Perfectly! Thank you so much!
The plugin works! Just look at the FAQ, everything is written there in clear language! The usernames may match (my case), so insert in functions.php code below to see user IDs: function true_user_id_column( $columns ) { $columns['user_id'] = 'ID'; return $columns; } add_filter('manage_users_columns', 'true_user_id_column'); function true_user_id_column_content($value, $column_name, $user_id) { if ( 'user_id' == $column_name ) return $user_id; return $value; } add_action('manage_users_custom_column', 'true_user_id_column_content', 10, 3); function true_user_id_column_style(){ echo '<style>.column-user_id{width: 5%}</style>'; } add_action('admin_head-users.php', 'true_user_id_column_style'); Then just select the ID of the desired user or users, use the plugin shortcode and that’s it! P.S. The code for displaying user IDs in the WP user menu is not mine. Unfortunately I can’t attach a link to the source. I will only say that this is the misha.agency website.
Does not work when Role name and slug are different
It does not work correctly when user role name and role slug are different for example Role name is ‘Member’ and slug is ‘abc_member’.
Nice, easy, sweet
Thank you!
Amazing! Perfectly! Thank you so much!
The plugin works! Just look at the FAQ, everything is written there in clear language! The usernames may match (my case), so insert in functions.php code below to see user IDs: function true_user_id_column( $columns ) { $columns['user_id'] = 'ID'; return $columns; } add_filter('manage_users_columns', 'true_user_id_column'); function true_user_id_column_content($value, $column_name, $user_id) { if ( 'user_id' == $column_name ) return $user_id; return $value; } add_action('manage_users_custom_column', 'true_user_id_column_content', 10, 3); function true_user_id_column_style(){ echo '<style>.column-user_id{width: 5%}</style>'; } add_action('admin_head-users.php', 'true_user_id_column_style'); Then just select the ID of the desired user or users, use the plugin shortcode and that’s it! P.S. The code for displaying user IDs in the WP user menu is not mine. Unfortunately I can’t attach a link to the source. I will only say that this is the misha.agency website.
Does not work when Role name and slug are different
It does not work correctly when user role name and role slug are different for example Role name is ‘Member’ and slug is ‘abc_member’.
Works as advertised
It does what I needed – restrict post read access to specific users
Amazing! Perfectly! Thank you so much!
The plugin works! Just look at the FAQ, everything is written there in clear language! The usernames may match (my case), so insert in functions.php code below to see user IDs: function true_user_id_column( $columns ) { $columns['user_id'] = 'ID'; return $columns; } add_filter('manage_users_columns', 'true_user_id_column'); function true_user_id_column_content($value, $column_name, $user_id) { if ( 'user_id' == $column_name ) return $user_id; return $value; } add_action('manage_users_custom_column', 'true_user_id_column_content', 10, 3); function true_user_id_column_style(){ echo '<style>.column-user_id{width: 5%}</style>'; } add_action('admin_head-users.php', 'true_user_id_column_style'); Then just select the ID of the desired user or users, use the plugin shortcode and that’s it! P.S. The code for displaying user IDs in the WP user menu is not mine. Unfortunately I can’t attach a link to the source. I will only say that this is the misha.agency website.
Works as advertised
It does what I needed – restrict post read access to specific users
Works just fine
Initial problem, as my template wrote content from outside the the WP $content variable, which wasn’t secured. Sorted it out with output buffering. All is good now.
Does not work when Role name and slug are different
It does not work correctly when user role name and role slug are different for example Role name is ‘Member’ and slug is ‘abc_member’.
Amazing! Perfectly! Thank you so much!
The plugin works! Just look at the FAQ, everything is written there in clear language! The usernames may match (my case), so insert in functions.php code below to see user IDs: function true_user_id_column( $columns ) { $columns['user_id'] = 'ID'; return $columns; } add_filter('manage_users_columns', 'true_user_id_column'); function true_user_id_column_content($value, $column_name, $user_id) { if ( 'user_id' == $column_name ) return $user_id; return $value; } add_action('manage_users_custom_column', 'true_user_id_column_content', 10, 3); function true_user_id_column_style(){ echo '<style>.column-user_id{width: 5%}</style>'; } add_action('admin_head-users.php', 'true_user_id_column_style'); Then just select the ID of the desired user or users, use the plugin shortcode and that’s it! P.S. The code for displaying user IDs in the WP user menu is not mine. Unfortunately I can’t attach a link to the source. I will only say that this is the misha.agency website.
Works as advertised
It does what I needed – restrict post read access to specific users