Admin page redirect to another admin page

You can use get_current_screen() to check on which page you are then make a redirect to specific admin page. get_current_screen() return the screen object like WP_Screen Object ( [action] => [base] => dashboard [columns:WP_Screen:private] => 0 [id] => dashboard [in_admin:protected] => site [is_network] => [is_user] => [parent_base] => [parent_file] => [post_type] => [taxonomy] => [_help_tabs:WP_Screen:private] … Read more

Hide Updates from Admins that don’t equal a set Username

You could try following: $current_user = wp_get_current_user(); if( user_can( $current_user, ‘main-admin’ ) ) { // Do your stuff } For more info please read in the Codex about: user_can , wp_get_current_user Edit: my mistake, was reading wrong, I thought you meant a custom role main-admin. Not to make my mistake suddenly as correct, but maybe … Read more

How do I change Administrator to Super Administrator

What RST said. “SuperAdmins” are for network (multi-site) only. That user has ability to be the admin of all sub-sites. “Admin” is the highest level for non-multi-site (non-network) sites. (added as an answer to show that this question is answered by a comment to the question).

Disabling ‘posts’ in Appearance > Menus

We can use the register_post_type_args filter to adjust how the post post type is displayed in the backend with e.g.: add_filter( ‘register_post_type_args’, function( $args, $name ) { if( ‘post’ === $name ) { // $args[‘show_ui’] = false; // Display the user-interface $args[‘show_in_nav_menus’] = false; // Display for selection in navigation menus $args[‘show_in_menu’] = false; // … Read more

Change home-url in dashboard

Try this. Even if you want to change “View Site” link then remove “site-name” and add “view-site” in get_node. Thanks. add_action( ‘admin_bar_menu’, ‘customize_my_wp_admin_bar’, 80 ); function customize_my_wp_admin_bar( $wp_admin_bar ) { $site_node = $wp_admin_bar->get_node(‘site-name’); //Change link $site_node->href = home_url().’/velkommen’; //Update Node. $wp_admin_bar->add_node($site_node); }

List User order by ID in Descending order (Backend)

I first thought that pre_user_query would be that hook for the job. But I think using the equivalent of pre_get_posts, which is pre_get_users, would be suitable here. You also said you wanted to run this in admin. So we will check that before running this. function my_custom_order_users_by_id( $query ) { //Check that we are in … Read more

Local WordPress installation doesn’t crop images

For the record since I ended up here when experiencing the same issue on my localhost: In php.ini, Uncomment the line with: extension=php_gd2.dll Restart apache / all services This sorted it out for me (I may have switched a few other services on while I was there, but I believe this is what fixed it!)

Theme Development Admin Area [closed]

You’re not supposed to modify the Dashboard. It’s recommended to create custom post types for content organisation and a top-level feature plugin for more complex options and settings. You can also use the Customizer to allow theme changes. A theme might already have these settings, so you could add some meta boxes with general help … Read more