Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
2 votes
2 answers
162 views

Remove or disable Appearance > Patterns

Not sure quite when, but a recent WordPress release has added a new WP Admin link under Appearance for Patterns: My themes don't use Gutenberg, and I've disabled it. But the Patterns screen is still ...
doofusb0y's user avatar
1 vote
0 answers
17 views

One custom taxonomy with unique sets of labels for two post types?

I’m trying to use one custom taxonomy with different labels for different post types. I have the default “post” post type, and a “podcast” post type. Both post types have an associated Taxonomy with ...
fischermade's user avatar
1 vote
1 answer
42 views

How can I have an admin only non-dashboard page in my Wordpress plugin

I am building a plugin with two pages, one will be part of the admin dashboard which is simple enough and will just allow admins to edit some data. The other page should also be only accessible for ...
Michael's user avatar
  • 11
0 votes
0 answers
17 views

How to access admin menu labels and links on front-end?

I am trying to retrieve a list of all the admin menu labels and links on the front-end so I can add them to my admin bar menu. I don't need the submenus. I was hoping to access global $menu, but it ...
Aristocles's user avatar
0 votes
1 answer
8 views

Remove custom post type from the auto generated list on the edit menu page Add menu items

How to remove a custom post type from the default wordpress admin menu editor nav-menus.php ? I'm sure this is already talked about but I can't find it in stackexchange.
Angel Hess's user avatar
0 votes
2 answers
63 views

Ignore "empty" fields when saving

My WordPress and PHP knowledge is limited, but I am working on a plugin, and in the admin page I have three settings - two text inputs and one checkbox. On save, the values are stored in the ...
mjlu's user avatar
  • 3
0 votes
0 answers
24 views

Create a menu and a submenu

I'm trying to create a menu and a submenu in wordpress, here is the code: <?php require_once(ABSPATH.'wp-config.php'); require_once(ABSPATH.'wp-includes/pluggable.php'); require_once(ABSPATH.'wp-...
Bruno Lima's user avatar
0 votes
1 answer
86 views

Remove custom menu pages for admin users

I've added some custom menù pages to my WordPress dashboard using the add_menu_page() function. I need to remove these pages for super admin roles, but the remove_menu_page() seems not working. This ...
ICTDEV's user avatar
  • 133
0 votes
1 answer
168 views

Import bootstrap 5 and bootstrap icons in wp-admin backend

I want to fully customize the wp-admin interface. I'm creating some plugins to remove the default menu pages and to add my custom pages, and seems working fine.Anyway I need to implement bootstrap 5 ...
ICTDEV's user avatar
  • 133
0 votes
1 answer
149 views

Wordpress add menu items display slug too

Using the Wordpress menu system to add an item (product category in my case). I have categories with the same name, under a different parent category, so when i search for the category i want it may ...
John's user avatar
  • 101
0 votes
0 answers
39 views

My custom fonts are uploaded and included in the list but do not apply

I created a dashboard that provides the option to upload fonts in .woff format which will be used with the Kirki framework. The files are added successfully but I can't figure out where to output the @...
justtme's user avatar
1 vote
1 answer
236 views

Can't add custom post type archive page to menu

I cannot add this custom post type archive page to any menu from the admin. Adding via the front end customizer works fine. Viewing the archive page on the front end also works fine. My custom post ...
Tommizzy's user avatar
0 votes
2 answers
24 views

Adding admin link to Appearance via admin_menu, adds link to theme details modal

When you use admin_menu hook to add a navigation item to the Appearances section in the admin menu it will also add that link to the modal that pops up when you click "Theme Details", ...
Kender's user avatar
  • 133
0 votes
1 answer
21 views

Add items to the dark menu in WordPress

I would like to add a category (is that what it's called?) such as 'Articles' to the WordPress menu. Not the one that will be visible to the end user, but this menu: Ty
LuchiniChiara's user avatar
0 votes
1 answer
938 views

Submitting form to admin-post.php Wordpress

I've been trying to get a basic plugin to work and I have followed what seems to be the flow to get the form to post to admin-post.php. However, I only seem to get the white screen of death upon form ...
Yintii.eth's user avatar
0 votes
0 answers
92 views

Remove menu pages only for non admin

I have this method in my plugin, I want to avoid that the users that are not administrator can see some menus in the dashboard. I know that this can be achived using the roles, but in my case I will ...
ICTDEV's user avatar
  • 133
1 vote
0 answers
140 views

admin_enqueue_scripts using hook_suffix vs GET page

My menu code: add_action('admin_menu', 'waf_admin_menu'); function waf_admin_menu(){ add_menu_page('WordPress Audio Filter', 'WordPress Audio Filter', WAF_CAPABILITY, 'waf_settings', '...
Toniq's user avatar
  • 437
1 vote
1 answer
85 views

Show Admin Menu

I am learning WordPress Plugin development. I need to create a Add New sub-menu like this image: My code is like below: public function register_custom_post_type() { $supports = ['title']; $...
Foysal's user avatar
  • 449
0 votes
0 answers
37 views

Display admin sidebar into custom post pages if logged

Is it possible to display the default admin sidebar in a custom post type page (frontend view) if user is logged in, as happens for the admin top bar? If is possible, how can I do this? Any hint?
vvave vvave's user avatar
1 vote
1 answer
40 views

Admin menu link with variable

I used this function to display a log out link below the home icon. But how could I put a variable, for instance the current username, on that link to show a profile page? The function is: ...
markseinto's user avatar
0 votes
1 answer
27 views

Admin submenu issue with PHP not detecting two strings as equal

I am adding a submenu page as follows: add_submenu_page( $slug, __('Categories','acs'), __('Categories','acs'), $cap, 'edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group' ); ...
Álvaro Franz's user avatar
1 vote
2 answers
113 views

How to add query args to links to CPT admin submenu

I have a custom post type I've created, and I've added an admin submenu page to display some data it generates. So far, so good. I'm displaying the data with my local extension of WP_List_Table, and I ...
philolegein's user avatar
0 votes
1 answer
298 views

How to make an admin plugin menu page go full screen?

I'm building a plugin that contains a simple editor for a particular file format. This will only be accessible in the admin menu's for the plugin, no frontend access. I've started looking at the ...
AutoBaker's user avatar
  • 151
0 votes
0 answers
50 views

Metaboxes inside Tab

I am learning WordPress Plugin development. In this regard I have to save some settings along with Custom Post in Admin Panel under a Menu. Can I place metaboxes inside tab for this issue like the ...
Foysal's user avatar
  • 449
0 votes
1 answer
516 views

Change the destination of the URLs in post.php

The post.php screen lists posts vertically in the admin area [and other post types]. Each item's post_title is a hyperlink, directly above some inline choices. Both the title link, and the "Edit&...
John Dee's user avatar
  • 503
0 votes
0 answers
71 views

How can I change the admin menu title and url title on WordPress

I was hoping someone can help me on how to change the admin menu title and also the link title that goes with it. I want to change Projects admin menu title to Services admin menu. Also, change the ...
Yor Ganawil's user avatar
0 votes
1 answer
285 views

Unable to get a simple plugin admin page to work

Even though I have years of software development experience, I am new to WP & PHP development, so please bear with me. After reading through the plugin manual, I started with a WP plugin boiler ...
helgew's user avatar
  • 111
0 votes
1 answer
33 views

Different Admin language

We are running our WP site in Hungarian but nobody in our team understands this language. We successfully changed admin backend language to our native language but not everything changed. We are still ...
Vlado's user avatar
  • 111
1 vote
0 answers
223 views

Calling the "wp-link-wrap" pop-up modal

When using the ACF, I noticed that the "Select Link" button calls a native modal called "wp-link-wrap". How can I call/access this modal without ACF?
G Chen Sin's user avatar
1 vote
1 answer
127 views

Visiting a console submenu page does not expand its parent menu item

*I have moved a custom post taxonomy to another menu item //created a post type that does not appear in admin menu, therefore its taxonomy does not, too $args = array( 'label' ...
Artem's user avatar
  • 305
1 vote
0 answers
413 views

Custom post types as sub menu pages and role capabilities issue

I'm working on this: Create a menu entry in the admin panel name "Products" Have a dozen of custom post types, all as submenus items of my admin menu "Products" entry Allow a role ...
Bardyl's user avatar
  • 111
0 votes
1 answer
44 views

Custom admin menu order fails if slugs are complicated

I'm not able to reorder WP Admin menu items when pages added with add_menu_page have complicated slugs. At least I think that's the problem... First I create the custom menu items, which is working as ...
EdA's user avatar
  • 103
0 votes
0 answers
553 views

Creating an admin button that when clicked shows a popup form

I am creating a custom plugin to add a button to the buttons panel when editing a post or page in the classic editor. I have no trouble adding a button to the panel, but am unsure of the best way to ...
Johnathan's user avatar
0 votes
1 answer
299 views

Give admin_menu permission to specific users

I created a admin menu for my Wordpress website. The capabillity / rules are set to manage_options. Now I want give permission to another user that is only an editor. Does anybody know how I can do ...
Jop's user avatar
  • 127
0 votes
1 answer
554 views

how to save checkbox data for custom setting?

I am creating one custom setting panel, my codes are function custom_text_field_html(){ $text = get_option( 'homepage_text' ); printf( '<input type="text" id="...
Ricky's user avatar
  • 53
0 votes
0 answers
34 views

Custom admin menu items

I'm very new to Wordpress, familiar with CMS though. I am taking over someone else's wordpress website, by comparing with other wordpress, I found this one has some admin menus that the other doesn't ...
shenkwen's user avatar
  • 131
1 vote
1 answer
1k views

Wordpress Side Menu Admin Panel Default Order numbers List?

Is there a page on the WP documentation someplace that lists the order numbers for the default menu items in the Admin panel on Wordpress? Cannot find anything on line that just gives a clear ...
Bradley's user avatar
  • 113
0 votes
1 answer
229 views

add sub_menu to a sub_menu (multiLevel sub_menu) in admin menu in wordpress

I'm looking to add a submenu, to another sub_menu that already exists. In WordPress, there are just 2 levels of admin menu (with functions: add_menu_page and add_submenu_page), my goal is to add ...
Leo's user avatar
  • 1
0 votes
1 answer
51 views

How to align the top of an admin pointer to the target element?

I am trying to create admin pointers for a plugin. First, I'm enqueuing the right assets: wp_enqueue_script( 'jquery' ); wp_enqueue_style( 'wp-pointer' ); wp_enqueue_script( '...
alexg's user avatar
  • 245
0 votes
1 answer
283 views

Restrict admin pages for specific user role

I have created new user role "advertiser" and added some capabilities: function prefix_add_user_role() { add_role( 'advertiser', 'Advertiser', array( '...
Juraj's user avatar
  • 144
0 votes
1 answer
697 views

How to break line / add <br> to ADMIN menu

Disclaimer: This question is not about "frontend" nav menu I am looking for a way how to break line in a menu item label in WP admin sidebar menu, sidereason is that the custom post type ...
jave.web's user avatar
  • 477
0 votes
0 answers
26 views

User role and capablities only for 1 plugin

What if i want a user called Marketing only to see the Slimstat plugin? The rest of the admin menu should be invisible for him. (for a external marketing agency that should see our stats but only our ...
MarcoDocker's user avatar
0 votes
0 answers
189 views

Block access to plugins.php for custom role

So I have a custom role and I'd like to block access to the plugins.php page without using a plugin. I can remove pages from the admin menu with my functions file but not sure how to restrict access
user1961395's user avatar
0 votes
1 answer
60 views

How to sort by two meta keys in admin area?

I am sorting a custom post on a page by a meta key called Order ordered by DESC followed by a meta key called Sub order ordered by ASC but I can't fathom how to do the same sorting in the WordPress ...
edwinbradford's user avatar
0 votes
0 answers
255 views

Hook event for upload image in the menu

I have to add the image in my dropdown. I know I can do this with CSS Classes (optional) but I don't want to do this. I want to add dynamically instead of open the code and change or add it. What I am ...
Naren Verma's user avatar
0 votes
1 answer
9 views

Cannot include custom post item within a menu

I'm trying to insert my custom post type within a menu of a theme. This theme actually have a custom post type called st_tours. So when I register my custom post type I do: $args = array( 'labels' ...
sfarzoso's user avatar
0 votes
1 answer
147 views

Why WP_Screeen doesn't show all options with admin_body_class

I was trying to add a specific class to the admin section. I created a new top-level menu page and now I want to add a specific class to this top-level menu and its submenu items. What I have tried so ...
Raashid Din's user avatar
0 votes
0 answers
458 views

Show all admin menus in a table

I Made a menu to remove admin menus for people that are not allowed to see it so they don't make changes to the site. But I can't get submenus to display only the main menu's this is the code: &...
Bent's user avatar
  • 1
0 votes
2 answers
358 views

Wordpress add page under admin submenu and retaining the active status of the parent submenu page in the menu

I have added a page in the admin menu(pxmag-menu) and a submenu(pxmag-plans). There is another page(pxmag-plans-edit) set under the submenu(pxmag-plans) as the parent page. public function __construct(...
sariDon's user avatar
  • 265
1 vote
1 answer
1k views

Add custom fields to specific menus

How do I add custom fields to a specific menu? For example, I have menu "Primary" with ID 13. How do I run the wp_nav_menu_item_custom_fields hook only if ID matches the currently selected ...
Justin Breen's user avatar

1
2 3 4 5
13