How to let the role “editor” to control the menu?

Add this to your functions.php // Allow editors to see Appearance menu $role_object = get_role( ‘editor’ ); $role_object->add_cap( ‘edit_theme_options’ ); function hide_menu() {       // Hide theme selection page     remove_submenu_page( ‘themes.php’, ‘themes.php’ );       // Hide widgets page     remove_submenu_page( ‘themes.php’, ‘widgets.php’ );       // Hide customize page     global $submenu;     unset($submenu[‘themes.php’][6]);   }   add_action(‘admin_head’, ‘hide_menu’); … Read more

How can I style my theme admin page?

In your construct function you also need to enqueue a custom stylesheet that will house the CSS to style up your theme options. A simplified example would look like this: function admin_style() { wp_enqueue_style( ‘theme-options-style’, get_template_directory_uri().’styles/theme-options-style.css’); } add_action(‘admin_enqueue_scripts’, ‘admin_style’);

Not able to give editors acess to new admin menu item

Must be a problem with the surrounding code, your add_menu_page code works fine inside my test code, i can see the item as an admin or editor. add_action( ‘admin_menu’ , ‘admin_menu_new_items’ ); function admin_menu_new_items() { add_menu_page(‘Calendar’, ‘Calendar’, ‘edit_posts’, ‘wp-eventcal/eventcal-manager.php’); } Works just fine for me.. Are you using any plugins for managing the admin menu, … Read more

Fatal error when using ‘#’ character as an admin menu link title

I figured out the problem: You must specify an ID in the add_menu array if the title is not alphanumeric. So, this code worked: function my_admin_bar_menu() { global $wp_admin_bar; if ( !is_super_admin() || !is_admin_bar_showing() ) return; $wp_admin_bar->add_menu( array( ‘title’ => __( ‘#’), ‘id’ => __( ‘my_menu_item’), ‘href’ => admin_url(‘myurl.php’))); } add_action(‘admin_bar_menu’, ‘my_admin_bar_menu’); The only change … Read more

Turn on again old expandable menu

Yep, believe so. Try this (enqueue in admin styles): Show sub-menus at all times #adminmenu .wp-submenu, .folded #adminmenu .wp-submenu { display: block !important; } Hide Pop-up Navs .wp-submenu.sub-open { display: none !important; } That should get you started with it, otherwise you can go to wp-admin.dev.css and edit the navigation there, starting at line c. … Read more

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