Add items to the dark menu in WordPress

You would need to create a custom post type by adding this code to your functions.php file (only do this if you are comfortable with editing theme files if not you should use a plugin such as “Custom Post Type UI”): function custom_post_type() { $labels = array( ‘name’ => ‘Articles’, ‘singular_name’ => ‘Article’, ‘add_new’ => … Read more

Responsive Admin Themes

Is there a way to achieve this type of Left dashboard Admin menu without using a plugin? You have to put the code somewhere. That is either going to be a plugin, a must-use plugin, or a theme. A theme is a somewhat strange place to be putting code intended for the backend, so the … Read more

How to unset adminmenu completely?

I don’t think you can remove it globally, maybe with traversing the global $menu array. But you can unset each individually: add_action( ‘admin_menu’, ‘Wps_remove_tools’, 99 ); function Wps_remove_tools(){ remove_menu_page( ‘index.php’ ); //dashboard remove_menu_page( ‘edit.php’ ); //posts remove_menu_page( ‘upload.php’ ); //media remove_menu_page( ‘link-manager.php’ ); //links remove_menu_page( ‘edit.php?post_type=page’ ); //page remove_menu_page( ‘edit-comments.php’ ); //comments remove_menu_page( ‘themes.php’ ); … Read more

Admin menu links just refresh the page

Sounds to me like the hooked function that calls the page file itself is the same for all five uses of add_submenu_page(). Hard to tell without the code. <?php add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function ); ?> The $function variable should be different for all five uses meaning you need another four function or … 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’);

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