How do I remove the entire left nav bar in admin for certain level users?

You could creatively use output caching to capture the adminbar and then discard it like so: <?php // this filter runs in menu-header.php L37 right before the admin menu is rendered add_filter( ‘parent_file’, function( $parent_file ){ ob_start(); return $parent_file; } ); // runs after the output add_action( ‘in_admin_header’, function(){ ob_clean(); // discard output echo ‘<div … Read more

reorder plugin menu position

Check if this solution (provided by @Syrehn) works: Reorder plugin items in the admin menu Try taking just the name from the page admin link and see if it works. Something like this: function custom_menu_order($menu_ord) { if (!$menu_ord) return true; return array( ‘index.php’, // Dashboard ‘separator1’, // First separator ‘edit.php’, // Posts ‘pluginname2’, // Take … Read more

Custom Theme Want To Remove One Category From All Displays

The only solution I could imagine is removing, rewriting, replacing the meta box. // First remove the original one function wpse21483_remove_catbox() { remove_meta_box( ‘post_categories_meta_box’, ‘post’, ‘side’ ); } add_action( ‘admin_menu’, ‘wpse21483_remove_catbox’ ); // not sure about the hook function wpse21483_new_catbox() { // re-define – take a look at /wp-admin/include/metaboxes.php } // Hook the new one … Read more

Change the Default Pages Menu View in wp-admin

[Update] Answer rewritten, based on this other Q&A. To achieve this: Use this code: add_filter( ‘custom_menu_order’, ‘wpse_48933_submenu_order’ ); function wpse_48933_submenu_order( $menu_ord ) { global $submenu; // Enable the next line to inspect the $submenu values // echo ‘<pre>’.print_r($submenu,true).'</pre>’; $arr = array(); $arr[] = $submenu[‘edit.php?post_type=page’][10]; $arr[] = $submenu[‘edit.php?post_type=page’][5]; $submenu[‘edit.php?post_type=page’] = $arr; return $menu_ord; }

check current_theme_supports in admin_menu hook

Not really sure what you’re asking here, but this allows theme support for navigation menus in your theme. Place this block of code in your theme’s functions.php file. if(function_exists(‘register_nav_menus’)){ register_nav_menus( array( ‘header_navigation’ => ‘Header Navigation’, ‘main_navigation’ => ‘Main Navigation’, ‘footer_navigation’ => ‘Footer Navigation’ ) ); }

How To Create User Specific Admin User Pages?

You can add a new page using add_(sub)menu_page();. WordPress is pretty kind in this case and offers tons of hooks, filters and higher level API functions that help you going around this. Let’s just use add_users_page(); and hook into admin_menu. Example plugin It adds an admin page that has the user_login as slug. Simply drop … Read more

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