remove/hide pages from users backend

One way to achieve this is by looping through the parent pages and fetching their respective children pages ids. The resulting arrays can then be merged and used in the ‘post__not_in’ variable. add_filter( ‘parse_query’ , ‘exclude_pages_from_admin’ ); function exclude_pages_from_admin( $query ) { global $pagenow,$post_type; $pages = array(‘1′,’2′,’3’); foreach ( $pages as $parent_page ) { $args … Read more

Exclude admin from user list

You could use user_can( $user_id, ‘manage_options’ ) to gauge the ids in the users array and unset($users->[$x]) the appropriate row. I would personally use $users = array(); foreach ($results as $user) if (!user_can( $user->ID, ‘manage_options’ )) $users[] = $user; But that’s just me.

Remove user profile field [duplicate]

Part 1 Create wpse_admin_user.css file and put it in your current theme, where style.css is: tr.user-admin-color-wrap, tr.user-admin-bar-front-wrap { display: none; } Add this code to your theme’s functions.php: function wpse_user_admin_script() { wp_register_style( ‘wpse_admin_user_css’, get_stylesheet_directory_uri() . ‘/wpse_admin_user.css’ ); wp_enqueue_style( ‘wpse_admin_user_css’ ); } add_action( ‘admin_enqueue_scripts’, ‘wpse_user_admin_script’ ); Part 2 Install and activate Custom User Profile Photo plugin. … Read more

How to change textarea rows height for user’s biographical Info?

Unfortunately there is no hook available to modify the HTML for the description field on the edit user page. The output is hard-coded. One workaround is to use CSS to set a minimum height for the text area. I think this is the best approach. add_action( ‘admin_print_styles-profile.php’, ‘wpse_user_description_css’ ); add_action( ‘admin_print_styles-user-edit.php’, ‘wpse_user_description_css’ ); function wpse_user_description_css() … Read more