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
1
vote
1answer
88 views

menu behavior is not as expected

I am trying to develop one of those nav menus that has one on top of the other like so: I am not sure if the issue is with the way I coded my header.php: <!-- HEADER ==============================...
0
votes
1answer
329 views

How can I write a formal sql query to get data from a custom table

I have created a custom page in wordpress admin panel with the help of add_menu_page and a custome table in database with the name wp_doners I want to fetch data from that table in that page so I ...
0
votes
1answer
2k views

Custom taxonomies not showing up in admin menu

I have defined a few custom taxonomies in my functions.php using the following code: <?php add_action( 'init', function() { $labels = array( 'name' => _x( 'Resource ...
3
votes
0answers
1k 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, ...
0
votes
1answer
126 views

Hiding the widget meta box in the Appearance->Widget screen

I don't want to unregister_widget() the widget on the screen, rather, just hide them for admins. Any ideas? I tried: remove_meta_box('widget-id', 'widgets'); but I couldn't figure out the second ...
1
vote
0answers
135 views

Show woocommerce categories on my theme menu styling

I am modifying a Theme I purchased since it is not prepared for woocommerce. It has an option to select a megamenu from a dropdown list on the menu where it says not megamenu. This is the code I find ...
4
votes
2answers
4k views

Adding a menu item in the admin bar

I would like to add a new menu item in the admin bar. So far, I have done the following: function add_book_menu_item ($wp_admin_bar) { $args = array ( 'id' => 'book', ...
3
votes
3answers
4k views

How to remove items from +New admin menu?

I would like to limit the +New admin menu to only show the single sub menu Event ("Veranstaltung"). Basically the users are allowed to create other items as well but not from that +New menu. I ...
1
vote
2answers
975 views

Hiding Admin Page While Keeping Menu Expanded

I am creating a custom admin section. I have the following code: // Top level menu add_menu_page('Books', 'Books', 'publish_posts', 'books', 'render_books_page', '', 17); // Adding this function to ...
0
votes
2answers
996 views

Is it possible to add 3 level menu item to admin menu?

I need to add a menu to a submenu in admin menu bar. Is it possible to do this in wordpress? For Example : A | -> B | -> C Or is there any work-around or hack to accomplish this?
1
vote
2answers
523 views

WordPress Plugin menu position overwrite other item

i've got a question. I created a plugin with a menu and i want to show this under the Dashboard menu-item. In some of my wordpress installations the dashboard item will be overwrited. How can i fix ...
2
votes
1answer
2k views

Sub menu with a URL parameter and access the page

I want to add the parameter for the submenus, but when I click to the admin page I get the following message: it throwing Sorry, you are not allowed to access this page. add_menu_page( 'Main Menu', '...
3
votes
1answer
94 views

Detecting when a custom taxonomy has been changed and display alert?

I'm building a plugin with a CPT and custom taxonomy - location. Everything's been working fine except I need to add a dismissible admin alert when the custom taxonomy has been changed either from the ...
1
vote
1answer
464 views

Add menu option to “New Post” menu in admin bar

I'm trying to figure out how to add an item to the new menu bar. To be clear, I know how to add items to the menu bar. I want to add something new under the bug plus sign in the admin bar. Here's a ...
1
vote
3answers
299 views

Why is the Links Manager visible?

The admin panel of my WordPress (4.7.2) installation on my hosting (godaddy) has "Links" section enabled. I set it up a few seconds ago with storefront theme. Then removed storefront and activated ...
0
votes
0answers
28 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
1answer
46 views

How to let the role “editor” to control the menu?

How to let the role "editor" to control the menu the only code i found was $role_object = get_role( 'editor' ); but i couldn't use it
1
vote
0answers
136 views

Role capability issue

I have a custom sub menu item that has been setup for a long time and all of a sudden today one Role cannot see the item on the Tools menu. They can see a couple of other items on that same Tools menu ...
0
votes
0answers
45 views

how to remove wp admin menu created by plugin

actually i want to remove instantsearch+ link from wp admin bar but i don't have the proper slug for this. when i mouseover on this link , it shows https://woo.instantsearchplus.com/wc_dashboard?...
0
votes
1answer
439 views

Dashicons not showed for admin menu

Wordpress version: 4.7.1 I'm registering a classic custom pot type register_post_type ( 'products', $products_args); Where $products_args contains menu_icon $products_args = array ( .... ...
1
vote
2answers
3k views

Insert & order custom post types in/as submenu

TLDR: While in the backend, I would like to add custom post type inside a menu page (which I can do). But I cannot order the resulting submenu pages. I have 3 custom post types “A”, “B”, “C”, and I ...
0
votes
0answers
218 views

Changing menu label to post name for custom post type

I have a custom post type. I would like the user to see the post name when they select the custom post type in the admin menu to edit it. I currently have this: $labels = array( 'name' => _x("...
1
vote
2answers
159 views

Wp menu add page link as custom empty link

i've a problem with wp menu, in the admin panel when i try to add a new page link to menu it creates a custom empty link instead, everything was working fine until i installed qtransalte X, when i ...
1
vote
1answer
52 views

Wordpress setting API strucked

The entire day today I remained frustrated with few things. I am learning WordPress setting API from a Video Course offered by Team Tree House. I was watching Videos and writing the codes ditto, but ...
0
votes
1answer
38 views

Wordpress theme options Menu

I am struggling from last 1 Hour couldn't find why the menu is not appearing WordPress admin. <?php function wpt_add_theme_page() { add_theme_page( __('Theme Options','wpsettings'), ...
0
votes
1answer
915 views

Custom Admin Menu Order for all User Roles

I've reordered the admin menu items through: function custom_menu_order($menu_ord) { if (!$menu_ord) return true; return array( 'index.php', // Dashboard 'edit.php?post_type=page', // Pages ...
0
votes
1answer
596 views

Editing a text file from plugin menu

This is my first time designing a plugin, so I would appreciate any assistance that you all can provide. My plugin has a txt file with datetime objects in it. The goal is to read the txt file from a ...
0
votes
1answer
437 views

How to Make Post Custom Column Editable

I have a custom post, and a custom column on that post, but there is no way to actually edit the data in that column for any particular post. I tried a few things, including hooking to the {name}...
2
votes
1answer
1k views

Plugin with specific admin menu icon

My new plugin uses the default icon set of WP in the admin-menu. That is not what I want. How do I code within my plugin or via functions.php a specific admin menu icon that suites my needs for my ...
0
votes
1answer
142 views

Remove capability to interact with a page

I would like to remove the capability to interact with a certain page in the admin dashboard from certain users. I mean read, edit, and whatever else. In other words, when a user visit a page (for ...
0
votes
3answers
825 views

How to remove admin menu pages inserted by plugins and themes in the top admin bar?

How do I find out the correct hooks that are being used when installed plugins and themes insert their own menus into the WordPress admin top menu bar? I know how to remove them from the admin ...
0
votes
2answers
447 views

Removing Admin Bar Node Based on Role

I have a custom role, grocery, that I would like to remove the "new content" (the + New dropdown) node from the top admin bar while this role is logged in. I have the following function but it is ...
0
votes
1answer
108 views

How to reference an existing css content-based icon, within my admin menu hook

Within WordPress 4.6.1, I really like the thumbtack icon that is being used in the admin menus. This is the thumbtack icon (generated in CSS) that I am referring to... I'm currently using the ...
6
votes
3answers
8k views

remove_menu_page doesn't work on custom plugin menus

Using the remove_menu_page() function works for removing the default admin menu items by their slug like so: add_action( 'admin_menu', 'hide_menu' ); function hide_menu() { remove_menu_page( '...
0
votes
1answer
928 views

Convert each new line in the textfield as a new value in an array

In my plugin, I've created a textfield (ID: main_menu) that allows the users to list the admin menu items by their menu slug (ex: index.php = Dashboard, plugins.php = Plugins, etc.): It's important ...
1
vote
0answers
3k views

Adding a submenu to the Tools menu returns tools.php in a popup box

I am trying to add a submenu to the Tools menu. When the custom Tools sub-menu is chosen, I want it to call a function. That function will echo things out to the browser page that is loaded. My ...
6
votes
3answers
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 ...
1
vote
1answer
286 views

Global State During an Admin Post

I recently converted some old WordPress code over to using the admin-post.php mechanism. add_action( 'admin_post_myaction', function(){ //...my code to do stuff here... //redirect back to ...
-1
votes
1answer
31 views

wordpress custom post type shows other cpt posts in admin menu

I have a wordpress website with 4 custom post type and Suddenly 3 of them show the other one posts in admin menu. what is the problem?
1
vote
2answers
78 views

How to remove post listing page for a custom post type

I want to provide functionality to create a single post into my custom post type. And for this, when user click on main option (name of post) at left side bar in word-press back-end It's automatically ...
3
votes
2answers
3k views

Reorder custom submenu item

In the Settings menu, I have the following menu items listed: Settings -- General -- Writing -- Reading -- Discussion -- Media -- Permalinks -- Blogging I'd like to the Blogging (options-general.php?...
1
vote
0answers
3k views

Widget page is missing from menu and default widgets are not showing

Necessary background information: I'm working on a website which were first developped by an other web agency. So I don't have all of the history of the project. I have an issue with a Wordpress ...
2
votes
1answer
782 views

Menu position (admin menu) of pages

Is there a method to change the menu position of the 'pages' post type? When registering new custom post types, you can enter an integer in menu_position but how do I do this for the preregistered ...
1
vote
0answers
531 views

Admin menu in front-end

How to move an admin menu from backend to front-end ? Menu is create with add_menu_page($menu_slug) and the URL is like abc.com/wp-admin/admin.php?page=$menu_slug. I need to use the admin page on ...
0
votes
1answer
250 views

Reusable metabox backend and frontend

I am trying to create a more transferrable/automated custom post type that would act as a error ticketing system (I know there are many out there, but I want one that is completely customised). The ...
3
votes
1answer
2k views

Plugin development: how to create a form and get custom data?

I am developing a booking plugin and I need help. My aim is to get data to and from a database from the WordPress admin menu (I created a custom menu page for it). Now I don't know how the form ...
1
vote
1answer
699 views

Remove or move admin submenus under a new menu

I'm coding a new Wordpress plugin that registers several new post types. They all have their own menu and submenus in the Wordpress backend. How could create a new menu (like a parent category) and ...
1
vote
1answer
201 views

Make menu page link inaccessible or disabled

I want to disable/hide the menu pages for users other than admin. I am able to successfully do it with the following logic. But the menu pages appear through the url. <?php function ...
1
vote
1answer
48 views

How do I demote a menu item in the admin menu?

Many plugins create a top-level item in the admin menu, even though there is no need. (There is discussion of when to create a top-level item and when to create a sub-item on the codex.) This can lead ...
0
votes
1answer
56 views

Print Dashboard submenu name and filename

Similar to my previous question, I want to print a list of all of the submenu items in the Dashboard like so: Updates > update-core.php Library > upload.php Add New > media-new.php etc... This is ...

1
3 4
5
6 7
13