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).

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); }

Change admin logout URL

The quickest way to do this is through an Apache rewrite via mod_rewrite. You’ll also have to tell WordPress where to points its login links using the login_url and logout_url filters. return apply_filters(‘login_url’, $login_url, $redirect); return apply_filters(‘logout_url’, $logout_url, $redirect);

Adding another “Add Post” button to admin

Unfortunately this isn’t possible (without a slight hack)- since there are no hooks provided (see for example the edit.php page). A quick and easy hack is to use JavaScript to add the link after the usual ‘Add New’ link. Here I’ve used the admin_print_footer_scripts hook (on ‘post’, or ‘edit-post’ screens) to print the JavaScript. Note … Read more

How to restrict wp-admin and prevent upload errors

You just need one extra thing for this. Here is the code I typically use to do what you are doing: function pws_block_admin() { if ( // Look for the presence of /wp-admin/ in the url stripos($_SERVER[‘REQUEST_URI’],’/wp-admin/’) !== false && // Allow calls to async-upload.php stripos($_SERVER[‘REQUEST_URI’],’async-upload.php’) === false && // Allow calls to admin-ajax.php stripos($_SERVER[‘REQUEST_URI’],’admin-ajax.php’) … Read more

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