2022 Developer Survey is open! Take 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
0 votes
1 answer
15 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&...
user avatar
  • 455
0 votes
0 answers
17 views

How to access wordpress menu & submenu item through the REST API?

I want to display the menu & submenu items from Wordpress in another web-application, menu and Submenu are get but there is more menu inside Submenu I want that. function return_menus( $data ) { $...
user avatar
  • 117
0 votes
0 answers
29 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 ...
user avatar
0 votes
1 answer
26 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 ...
user avatar
  • 111
0 votes
0 answers
39 views

How to redirect with success message in wordpress admin panel?

I have custom form which is in wordpress admin panel and handle the form action in functions.php file but i cant redirect with success message. i have tried the form action with the following hooks ...
user avatar
  • 11
0 votes
1 answer
24 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 ...
user avatar
  • 111
1 vote
0 answers
19 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?
user avatar
0 votes
1 answer
66 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' ...
user avatar
  • 63
1 vote
0 answers
51 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 ...
user avatar
  • 111
0 votes
1 answer
12 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 ...
user avatar
  • 103
0 votes
0 answers
102 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 ...
user avatar
0 votes
0 answers
14 views

Wordpress menu items automatically becoming empty custom links

I have a WP site and recently my nav/menu got screwed up. In the admin, I see all my menu items got automatically converted to empty menu items. Here is the screenshot: I came across this question ...
user avatar
0 votes
1 answer
69 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 ...
user avatar
  • 17
0 votes
0 answers
37 views

How to hide the sidebar and topbar in specific admin page

I would like to hide the sidebar and top bar (refer image below) on specific page, that is to focus on the content of the page itself. Because on this specific page, I would like to get it using ...
user avatar
0 votes
0 answers
23 views

Hide WooCommerce from Admin Menu without Path Access

I am trying to hide the WooCommerce tab admin dashboard. This method works, but the result is it also blocks access any links with the wc-admin path in the url. function pls_hide_woocommerce_menus(...
user avatar
  • 106
0 votes
1 answer
51 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="...
user avatar
  • 39
0 votes
0 answers
30 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 ...
user avatar
  • 117
0 votes
1 answer
211 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 ...
user avatar
  • 103
0 votes
1 answer
40 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 ...
user avatar
  • 1
0 votes
1 answer
26 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( '...
user avatar
  • 235
0 votes
1 answer
34 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( '...
user avatar
  • 144
0 votes
1 answer
236 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 ...
user avatar
  • 417
0 votes
0 answers
23 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 ...
user avatar
0 votes
0 answers
46 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
user avatar
0 votes
1 answer
28 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 ...
user avatar
0 votes
0 answers
60 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 ...
user avatar
0 votes
1 answer
7 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' ...
user avatar
  • 127
0 votes
1 answer
86 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 ...
user avatar
0 votes
0 answers
199 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: &...
user avatar
  • 1
0 votes
2 answers
82 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(...
user avatar
  • 213
0 votes
1 answer
346 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 ...
user avatar
0 votes
0 answers
64 views

Wordpress Admin Panel Left Sidebar No showing on Post create page

These are two different WordPress sites on post create pages. The first site has left the admin panel. The second admin panel does not have a left sidebar. How can I add the left sidebar on the second ...
user avatar
0 votes
1 answer
44 views

Weird white space in admin area

I have had this weird whitespace appear multiple times on multiple sites. By "appear" I mean, it wasn't there one day, then it was. I am the only admin on these sites, which are in the cloud....
user avatar
  • 455
0 votes
1 answer
28 views

WP components no style

I'm trying to build a plugin menu using wordpress components but it appears all the styles are missing. For ex. the button isn't colored the primary(Blue) in the following sandbox.. https://...
user avatar
  • 33
1 vote
0 answers
32 views

Set different custom menu items for different user roles

I have added some custom menu using add-menu_page and it is working perfectly with the default administrator admin bar. But when I log in to different user roles, they are not showing. My question is ...
user avatar
0 votes
1 answer
910 views

on change form submit variable value not updating

I try to make custom theme option, a switch select option can change $bannerchange value. but i cannot add/update value of $bannerchange, select option inside a form. working fine with submit button ...
user avatar
0 votes
1 answer
81 views

Show admin menu and toolbar in admin post page

Is there a way to still show the admin toolbar and/or the main wordpress admin menu in the admin post page?
user avatar
  • 275
0 votes
1 answer
24 views

Any other way of storing plugin admin data setting

I created a plugin, and used the add_admin_menu() to add some page for users to put their Api keys and secret word. My page content is just a form to collect those data the users puts in, now my ...
user avatar
  • 3
0 votes
1 answer
19 views

How can i redirect click to new admin page not to edit screen in post table

Hi community i create a custom post type "message". The posts are created from front-end by user by filling a form. i want on admin side when admin access this post and click on post title ...
user avatar
12 votes
4 answers
3k views

How to fix the admin menu margin-top bug in WordPress 5.5?

I recently updated a WordPress instance from 5.4 to 5.5 to end up with an annoying margin-top in the admin area, above the menu directly. I deactivated all plugins, switched themes, did some ...
user avatar
  • 221
0 votes
1 answer
32 views

Is there a way to display a custom post type menu item as "users" submenu?

"client" is a custom post type because I have to add several metaboxes. For a better ergonomy on admin side, I would like to add my custom post type "client" as "users" ...
user avatar
  • 770
1 vote
0 answers
96 views

Show/Hide 'add new user' custom fields in wordpress admin panel by click another field

I have created a custom field in the 'add new user' section using this hook "user_new_form" in the wordpress admin panel. Now I want to show or hide this field on the base of role. Can ...
user avatar
0 votes
0 answers
83 views

add menu page not showing Icon

I have issues with add menu page it doesn't show my custom Icon. class V { function __construct() { add_action('admin_menu',array($this,'add_plugin_menu')); } ...
user avatar
0 votes
0 answers
97 views

Error on clicking 'Screen Options' tab only at Products-related editor screen(s) and for specific user

My client has problems with the Screen Options tab and in general with Javascript (or maybe WPBakery) related parts of the Admin screen. WPBakery-s blue buttons are not displaying to him at all. And ...
user avatar
0 votes
1 answer
412 views

Plugin Admin Menu Boiler Plate

So, I've done a lot of searching around and there doesn't appear to be any form of Boiler Plate for creating Custom Forms, Dropdowns and that kind of thing within a custom Wordpress plugin. Although, ...
user avatar
0 votes
1 answer
674 views

Backend Checkboxes working – but not visual?

first…sorry for my bad English. Since a few months I have a problem with the checkboxes in the wp backend. They are working, but you can´t see that they are activated. (see enclosed picture as an ...
user avatar
0 votes
2 answers
106 views

Removing menus from users other than the administrator

I want to remove some of the menu links from all users except the administrator. How can I do it?
user avatar
0 votes
0 answers
35 views

Add helper text in custom-header section in admin

In my custom theme I created a custom header section : add_theme_support( 'custom-header', array( 'video' => true, 'flex-width' => true, 'flex-height' => true, 'width' => ...
user avatar
0 votes
1 answer
191 views

add_menu_page not show link for custom role

I write a custom plugin, with one link for administration purpose. This is my code: add_action('admin_menu', 'tb_instructor_menu'); add_action( 'init', 'aggiungi_ruolo', 11 ); function aggiungi_ruolo(...
user avatar
2 votes
3 answers
469 views

How to allow "Add New" capability of CPT when links to its UI are placed as a submenu?

(Edit: going for the "Student" badge, and wondering if anyone out there could up vote this question?) I answered a question about capabilities, but now I'm in need of help on the subject. And after ...
user avatar
  • 884

1
2 3 4 5
13