-2
votes
1answer
20 views

wp_nav_menu() doesn't assign proper class to elements and it forces wrapping the ul element

I'm having trouble with wp_nav_menu function. I want the menu to have no div wrapper; have the class sf-menu right for ul element of the menu and li elements not have any classes. I've tried many ...
2
votes
2answers
5k views

How to use a WordPress' existing admin icon?

I use the add_menu_page function to add an new admin menu: add_menu_page( 'Custom_menu', 'Custom_menu', 'edit_posts', 'custom_slug', '', 'wordpress_existing_icon', 5 ); ...
18
votes
2answers
5k views

add_menu_page() with different name for first submenu item

The add_menu_page documentation says to pass the menu title as the second parameter: add_menu_page('Page Title', 'Menu Title', ...); When adding more pages later via add_submenu_page, the main page ...
0
votes
1answer
179 views

How to add custom menu item on plugin activation?

When my plugin is activated, I would like to add a new menu item. Here is my code: class My_Plugin { function __construct() { register_activation_hook(__FILE__, array($this, 'install')); } ...
1
vote
1answer
469 views

add_submenu_page function to show videos table

wondering if its possible to show the attachments admin list for videos by using a custom menu link? Any pointers welcome! D. add_action('admin_menu', 'mt_add_pages'); function mt_add_pages() { ...
0
votes
2answers
149 views

and custom post_types to custom menu

managed to create a custom menu area in the admin but now want to place 2 post types to it. They already exist - questions & answers, but can't find a way to put their menu links into the custom ...
1
vote
1answer
127 views

Settings page above CPT page in admin section

I'm creating a plugin which generates a handfull or custom post types (CPT). I've create a top level menu in the admin left sidebar using add_menu_page(). I then added all CPTs to this menu using ...