Questions tagged [admin-menu]

Usually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. The best way to present the user with such a screen is to create an administration menu item that allows the user to access that settings screen from all the Administration Screens.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Change the default page after admin login

When I login as admin, in the admin panel I am redirected to /wp-admin/admin.php?page=wphpuw. How can I set the dashboard as default screen after login e.g. /wp-admin/index.php. Is there some settings ...
0
votes
1answer
15 views

remove duplicate name submenu link from the custom post type

I was wondering what would be the proper way to remove submenu with duplicate name in custom post type in the admin. I tried to use remove_submenu_page() however since its a duplicate it is showing ...
0
votes
0answers
19 views

Include default sub-menus with custom admin menus via `show_in_menu`

We have many custom post types are are looking to tidy WP admin. We are creating a custom menu : function custom_admin_menus() { add_menu_page( 'Group1', 'Group1', '...
0
votes
1answer
24 views

grant multiple roles access to specific admin menu item

I am writing a plugin that offers an admin menu item which only a specific, custom user role ("customrole" in the example) can access. I have implemented this as follows, and it works: function ...
0
votes
4answers
3k views

Delete option doesn't appear for plugins

On the Plugins screen I have options to activate and deactivate plugins, but I no longer have the "Delete" option. I'm relatively sure the option appeared earlier. Also, when I hover over "Plugins" ...
1
vote
1answer
137 views

Add custom admin menu item for pages using a certain template

I am looking to add a new, custom menu item to the WordPress admin sidebar that displays pages that use a certain template. For example: a group of pages uses the template called "Retailer Sendout" (...
0
votes
0answers
16 views

Highlight admin top menu custom item with the same as core menu url

I faced with the following issue: I have core admin menu group - Users (containing "All Users", "Add New" and "Your Profile" items) and custom Top-Level item Couriers, which is just a Users with a ...
1
vote
1answer
214 views

Custom WP_List_Table displays blank rows

I am trying to make a custom WP_List_Table extension to display a custom post type. Here is what the table and the DOM look like. You can see that it is rendering the table rows empty, and no header. ...
0
votes
1answer
51 views

load-{$page hook} and returned parameter

I am using this code to enqueue scripts and styles to wordpress plugin. This works well, but I am wondering is there some parameter available in my_admin_enqueue_scripts function? Because I would like ...
0
votes
1answer
45 views

add_submenu_page returns null

After creating a parent admin menu item, which works fine, I fail to add a submenu page. Trying to var_dump the return value of add_submenu_page() I get 'null'. My functions are: /** * ...
0
votes
1answer
19 views

My Sites link in multisite is incorrect

Within the network admin, the My Sites link, is not linking to the main parent site. Instead, it links to a child site blog. How can I change this link? Is there a way to rebuild WP menu? I haven't a ...
1
vote
3answers
94 views

Bootstrap doesn't work on admin menu page-How to override wp-admin style?

I am building a plugin and i use bootstrap to style it but i notice some components styles don't work properly.Someone suggested in a blog post to use wp_deregister_style('wp-admin'); which did fix ...
0
votes
2answers
55 views

hide page menu from admin panel for specific users

I want to hide page menu from the admin panel for a specific user type. I tried it with the below codes in functions.php function hide_menu_items() { global $menu; global $current_user; ...
5
votes
2answers
2k views

How to limit wordpress menu depth in admin panel

Is it possible to limit maximum menu depth in admin panel /nav-menus.php? I need this because my theme won't support more than two levels of menu, so there is no point in allowing a user to make ...
2
votes
1answer
333 views

Removing “Sub-menus” from My Sites Drop-down in Admin Bar

How does one remove the "sub-menu" that appears to the right of each site listed in the My Sites drop down from the admin bar? That is, I want to have a list of My Sites without the Dashboard/New ...
0
votes
0answers
16 views

How can i create custom post type in tab with display my custom page functionalities

We are created custom post type name is vendor with removed the create_post capability because we provided admin can create vendor with user. we already build a create user functionalities with ...
2
votes
2answers
229 views

How to Add a Link to the Drop-Down User Menu in the Admin Bar?

I need to add a link to the drop-down user menu in the admin bar. Is there a hook or function for this?
0
votes
0answers
15 views

How i add custom post type menu in add_menu_page(under another admin menu )?

I am making a plugin which has own dashboard and some menu,so i have to create a custom post but i see my post type has own menu option so i want my custom menu in my own plugin menu.
15
votes
5answers
14k views

Passing arguments to a admin menu page callback?

Situation: I'm working on a plugin and I'm developing it as a class, everything worked fine until I run into this situation. I wanted to make things a bit cleaner and tried this.. class MyPlugin { ...
1
vote
1answer
111 views

Dashboard menu missing

I've lost the wp_users and wp_usermeta tables in a wordpress installation. I've recreated them and insert a new admin user. In particular, in wpAA_users (I use the prefix wpAA_), I have now a user ...
8
votes
5answers
21k views

Remove Categories / Tags From Admin Menu

I want to remove or hide Categories / Tags submenu under Posts in the Admin Menu. I know this works with the themes submenus: remove_submenu_page( 'themes.php', 'widgets.php' ); The same doesn't ...
0
votes
0answers
19 views

Register custom taxonomy for all post types but list under pages

How I can register one (or more) custom taxonomy listed under "Pages" in the wp-admin menu but to be usable on the all other (registered) custom post types? Here is code what I use: ...
0
votes
0answers
10 views

Is there a way to completely replace the sidebar in the admin panel?

Pretty new at this and was wondering if there is any way of completely replacing the sidebar in the admin panel? I found the hook do_action( '_network_admin_menu' ); but I'm not sure if that is the ...
3
votes
2answers
4k views

Wordpress Admin Tooltip hooks

I want to know if there is a way to use Wordpress Adminitration Tooltips (de gray and blue ones) that are shown one you update your worpdress (3.x). Showing the new features. Thanks!
1
vote
1answer
6k views

Admin Menu - Highlight top-level menu when on a sub-menu page (without showing sub-menu)

This is the current situation: I am writing a plugin that has a top-level menu page The plugin also contains other sub-menu pages The sub-menu pages are not assigned a parent slug (thus they do not ...
0
votes
2answers
90 views

What's the correct way of moving a menu page to a submenu

In one of my client sites, the default comment feature is not needed globally. Instead I'm using it only under a certain CPT (eg. Complaints). With the following code, I moved the parent menu item: "...
0
votes
1answer
20 views

Using menu_position to add two entries between Dashboard and Posts

We're looking to add two new (custom post type) entries between Dashboard and Posts. In this project, for the end user, two items are going to be by far the most used items in his dashboard. So we ...
4
votes
5answers
6k views

Removing an admin page added by a 3rd party plugin. Gravity forms in this example

I'm trying to hide a help page from editors, added by the gravity forms plugin. I believe I've run into the same issue before with other plugins, so I'd like to know the correct way to do it for 3rd ...
48
votes
7answers
80k views

How to remove admin menu pages inserted by plugins?

I've got the following code, which cleans up a lot of stuff that is not going to be used within the admin area: add_action( 'admin_menu', 'my_remove_menu_pages' ); function my_remove_menu_pages() { ...
18
votes
10answers
21k views

Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?

I just figured out the menu_position parameter it seems like you can place the menu of your custom post type almost everywhere. Except above the Posts menu! How can I accomplish that?
0
votes
1answer
11 views

Highlight active Admin Menu when added though add_menu_page

I added a direct link to a page in the admin menu with the add_menu_page function. Once I click on the link, the About page edit screen opens, great. The problem though, i want the About menu item i ...
0
votes
0answers
29 views

Confused where some of these admin menu items came from

I am working on a client's site. I noticed they don't have a Post admin menu item and instead have a Products. I also have a download center and a few other admin menu items. However, when I go ...
4
votes
3answers
6k views

Order Admin sub-menu items?

I am adding items to a CPT Admin menu using add_submenu_page which works great, but they are added to the bottom of the sub-menu after the CPT options. I want to be able to have them on top , but I ...
0
votes
0answers
15 views

How to block the WP admin menus form loading depending on the current URL?

How can I block the WordPress admin menus and admin bar from loading depending on the URL. So that when a user visits a certain page in the admin area he will only see the wp-content block while the ...
0
votes
2answers
987 views

Disable Auto-Expanding Menu in Wordpress Admin Menus

Right now, when I click on a menu item in the wordpress admin menu, the section that that page belongs to is automatically expanded. For instance, if I click on a link in the Settings section then ...
-1
votes
1answer
194 views

Woocommerce like admin tabs and navigation

I'm working on a WooCommerce addon/plugin and created a custom admin sub page under WooCommerce menu in dashboard. Now I am looking to add tabs and sub navigation as per the Settings page under ...
0
votes
0answers
31 views

Load admin menu page from plugin class

I'm learning how to create options pages for my plugin. I have found an interesting article on this argument and I'm trying to do the same. I have a doubt about the implementation inside a class. I ...
0
votes
1answer
33 views

How to sorted Parent Page in WP-admin

I have a question. I want to sort pages by title in Page attributes - Parent page in post in WP-admin ?? Any ideas on how to do this?
0
votes
1answer
285 views

wrapping 'rest_api_init' in 'is_admin()' function

i'm create custom admin page via add_menu_page, let's imagine that my custom page has url wp-admin/admin.php?page=settings_page then i'm checki is_admin() function via var_dump on my ...
0
votes
1answer
22 views

Linked pages not working with wordpress

I used this code to create a menu page which loads mypluginpage.php and it works fine with my plugins. I can access it from something like http://mysite/wp-admin/admin.php?page=myplugin <?php // ...
0
votes
2answers
3k views

Hide Theme options and Customize Admin menu

Under the appearance admin menu, I have customizer added by the theme, and theme options added by a plugin. I'm using this code to hide both menus ( submenu's of Appearance )for ALL admins apart from ...
0
votes
0answers
9 views

API Function to use in place of global $menu?

Just wondering... Googling it I cannot find it. I'd like to not depend on globals at all in any circumstance.
0
votes
1answer
85 views

How to move “Collapse Menu” to top of admin bar?

As stated in the title, I try to perpetually move the "Collapse Menu" button which is normally the very last entry in the admin sidebar (backend) to the top. I googled but can't find any working ...
3
votes
1answer
158 views

enqueuing React script and hooking its target div fails to load script

I am getting a silent failure on the below code as I try to enqueue a static React.js script and hook its injecting div into the admin_footer. I see the page and my test echo plus the url of the ...
1
vote
1answer
334 views

Need Help Figuring Out Admin Menu Hover Styling Class

I am building a plugin that part of it has to do with styling the WordPress Dashboard Admin menu. I have everything all coded and working I am just stuck on this one piece. I need to find the CSS ...
0
votes
1answer
405 views

Limit number of posts under a post type?

I'm building a plugin that registers a custom post type. I'm looking for a way to limit the number of these types of posts at which point the user can no longer 'Add New' posts to this post type. Is ...
12
votes
4answers
7k views

Remove duplicate main - submenu in admin?

When I use add_menu_page & add_submenu_page to add menu items, add_menu_page( 'Forms', 'Forms', 'administrator', 'forms', 'forms_job_menupage_cb' ); add_submenu_page( 'forms', 'Job Applications', ...
4
votes
5answers
5k views

Remove Customize Background and Header from Appearance admin menu without CSS or JS

I am trying to remove background and header from appearance menu, but they don't seem to go away! I think it's because I have activated customize, but can I remove them anyway without using CSS or JS? ...
1
vote
0answers
30 views

How to display options page under custom menu?

SOLVED: I managed it to solve by using add_sub_menu I have this code to create an options page. But this shows under the setting( code is from WordPress documentation. I want to display it under my ...
1
vote
1answer
87 views

Remove All in One Pack from the admin bar

Hello I want to remove All in One Pack from the admin bar. I can remove anything else but it. I have already removed other things like update from the admin bar using this method Get the menu's id ...

1
2
3 4 5
13