Questions tagged [add-menu-page]

Add a top level menu page.

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
11k views

Add custom page link with anchor

In my admin section I would like to add in Appearance > Menus > some custom pages to add to my menu. I have two different menu one for the home page and one for the others pages. In my home page menu ...
3
votes
0answers
802 views

How to change menu page capability

Is it possible to change the capability set for a menu page, previously added with add_menu_page()? I have a third plugin installed, that set a menu page created with a 'manage_options' capability, ...
2
votes
0answers
489 views

Why add_menu_page adds admin.php and how to remove it?

I'm trying to add custom menu items for my Custom Post Type. I've added "show_in_menu" => false in my CPT definition so it will not show in admin menu. Then I've added to admin_menu action: ...
1
vote
0answers
34 views

add_menu_page the children get url encoded prefix

Here i create the pages: add_action("admin_menu", "wpa_create_plugin_pages"); function wpa_create_plugin_pages() { //Add submenu to Users $wpa_profile = "wpa_user_profile_settings";//parent ...
1
vote
1answer
29 views

Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?

I'm encountering funny behaviour with a custom post of mine that I'm working with in a plugin of mine. Here are the arguments of the custom post: array( 'label' => [omitted], 'labels' =>...
1
vote
0answers
40 views

Is there documentation reference for forms in menu and setting pages?

Trying to stick to WordPress best practices and improving how I do plugin development I have searched through the codex and developer documentation to see if there is anything indicating what is ...
1
vote
0answers
173 views

Admin Dashboard with Custom Tab for Client

I am trying to create a basic Tour Date widget. When the user clicks on the Tour Date Tab from the admin dashboard I want them to be presented with five fields. Date Venue City, State or Country ...
1
vote
1answer
507 views

Pagination in plugin's backend

I am displaying a list of posts in the plugin backend but I can't seem to get the pagination to work. I used the standard approach of getting the "paged" variable and then passing it to get_posts()'s ...
1
vote
1answer
625 views

Is there any way to add absolute path for add_menu_page function?

I am creating a plugin for add menu option to WordPress admin and using below function for that: <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $...
1
vote
0answers
151 views

How can I highlight a top level dashboard menu item created for a custom taxonomy?

I've used add_menu_page() to create a top-level dashboard menu item for a custom taxonomy. This is due to some specific needs with respect to this plugin. The menu item works fine, but when you ...
0
votes
0answers
167 views

Max Mega Menu - Change it to alphabetical order

I have a max mega menu plugin on my website. I would like a single dropdown, with 5 columns. I would like to put the menus in alphabetical order, underneath each other, but when i try to move them, ...
0
votes
0answers
36 views

Create Wordpress Menu Item Without Linking to a Custom Page

With add_menu_page there is a required option to add a menu slug that leads to a admin page. I wish to create a custom admin item, but not one that links to another page (I have other plans for the ...
0
votes
1answer
158 views

Not able to show the add_menu_page icon

I am working a plugin development. I want to show an icon on the menu Page. I am using the following code : add_menu_page('pms_rohitashv','PMS','subscriber','pms_rohitashv-main', plugin_dir_url( ...
0
votes
0answers
23 views

How to create a custom menu for specific user

Hi it is a way to create custom menus for each user and user roles. Each user needs to have specific page.
0
votes
1answer
93 views

add menu page in loop menu order

I have a function that creates custom admin menu items from an array of child pages. They seem to get returned in alpha-numeric order. I would like them to get sorted by the page order set in page ...
0
votes
1answer
20 views

How do I create a new directory to hold the assets for a new menu item?

I'm a new webmaster, given a WP site to fix. two menu items on the front page are dead since the code does not href a url. I also am not yet a full admin since the Dashboard does not offer ...
0
votes
0answers
26 views

how to create pages and link them to a menu

I am having some issues linking pages to the menus I have created. I used "appearance"-> "Customize"-> "Menu" and created custom menus from there since I cannot access my "Appearance/menu" properly. ...
0
votes
3answers
318 views

usage of admin_url() in add_menu_page()

Does anybody have experienced this issue: using admin_url() in add_menu_page() returns an url that contains the domain name twice: add_submenu_page( 'smart-crm', __('WP SMART CRM ...
0
votes
1answer
1k views

Adding submenu to custom plugin menu page created with add_menu_page() function

I have created a custom menu page using add_menu_page() function. Everything in that page appears as it should in the screen. What I am trying to achieve is adding another submenu under the under the ...
0
votes
1answer
69 views

How to add a menu page for options in wordpress for user that has the role of vendor?

I want to add new options page ONLY for those users whose role is vendor. How can I do that? This is my current code. add_action('admin_menu', 'business_settings_menu'); function ...
0
votes
1answer
209 views

Add Admin menus or submenus depending on conditions

I have two plugins in two different files that add a submenu (the plugin title) to the admin panel like this: Plugin 1: function myplugin1_setup_submenu(){ add_submenu_page("mybrand", "My ...
0
votes
0answers
149 views

Dynamic admin submenu

I'm creating a plugin for WordPress with dynamic sub-menu's fetched from the server. Putting the dynamic loading of sub-menu's into the menu_setup() hook function would slow down other WordPress ...
0
votes
2answers
513 views

Is it possible to have dynamic post id # in add_menu_page()?

I use the add_menu_page function in my custom theme builds but when I export my local copy of the site and import it in the production site some of post id numbers change and I have to update this ...
0
votes
1answer
245 views

Add a page in admin without adding menu item

In my plugin I have registered a menu_page; now I need another page. How can I add another page to my plugin without adding another menu item? Is it possible to call it by href?