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
1answer
388 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 ...
0
votes
0answers
2k 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 ...
4
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 ...
1
vote
1answer
203 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
54 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
2k 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
2k 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
650 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
457 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
216 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
422 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
168 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 ...
0
votes
1answer
41 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
51 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 ...
2
votes
1answer
37 views

How to change page via login as user and admin

I am using WordPress and I'm trying to develop eCommerce website using WooCommerce. When a user logs in I want to show the following in the menu-bar: Product Category Users profile Orders Cart Then,...
0
votes
1answer
104 views

Print Dashboard menu name and link

I am trying to display the Dashboard's menu by showing the name and the filename associated to it like so: Dashboard > index.php Posts > edit.php Media > upload.php etc... This is what I ...
0
votes
2answers
2k views

'Headers already sent' Error When Redirecting from add_submenu_page() Callback

This is a very common issue, but all the answers I read don't relate to what's happening in my case. I'm writing a custom plugin that reads and writes/updates data to a custom database table (it's ...
0
votes
3answers
890 views

Remove query var on admin pages when 'Save changes' pressed

In the admin backend we use a query arg that is left in the URL and keeps getting used whether it is supposed to or not. Our plugin has an array with values that can be toggled via the custom backend ...
1
vote
3answers
5k views

How to change admin menu position of “Media”?

I would like to change the priority/menu order of the "Media" admin page. Is there a way to change that via apply_filter? Is there a way to change only "Media" page priority without having to list ...
2
votes
0answers
514 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: ...
0
votes
0answers
111 views

Issue with search form admin panel after PHP migration

I have website hosted on OVH, and currently I am using PHP v. 5.3. Since OVH will stop supporting it soon I have to migrate to 5.4, 5.5, 5.6 or 7. I've tried 5.6 and 7 but what happens is that ...
7
votes
1answer
285 views

Admin settings update updating every time home page is hit?

I have created a plugin that sends an email with all orders placed that day by X o'clock to email Y. I followed the tutorial here: https://scotch.io/tutorials/how-to-build-a-wordpress-plugin-part-1 ...
1
vote
1answer
2k views

Add menu page on multisite

I'm trying add menu page in multisite (settings will be global for all blogs). Current code created in plugin and activated in network function wpdocs_register_my_custom_menu_page() { ...
0
votes
2answers
780 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 ...
10
votes
1answer
6k views

How to Add a Third Level Sub Menu to the Wordpress Admin Menu

Is there a function, action or filter that I can use to add a third level drop-down menu to the WordPress admin menu. For instance, right now in the sidebar menu, there is a menu for posts and under ...
1
vote
1answer
1k views

Admin page repeatable fields

I have a submenu page set up and I want to add repeatable fields to it. The submenu page is to add staff holidays (fields will be Start Date, End Date and a multi select to pick the staff members ...
0
votes
1answer
706 views

How put the correct URL to sub-menu plugin?

I'm trying to build my first plugin and building my plugin menu like this: function group_panel(){ include('html/example.html'); echo "<h1>{$_POST['data']}"; } function ...
0
votes
1answer
957 views

Change users.php WP_User_Query

A client has requested to have two kinds of custom user roles, and have those users displayed in an Admin Menu Page of its own. So far, I've achieved that using WP_List_Table with success. Now, the ...
1
vote
1answer
52 views

Suggestions on Approach to New Plugin I'm Stuck On

I'm a newbie plugin developer, and I've had an idea for what I though would be a simple to build debut plugin, but I seem to have reached a brick wall with it and wonder if anyone can suggest some ...
0
votes
2answers
164 views

Show custom taxonomy not in submenu

I have one small problem and I can't find answer...I have created custom post type and custom taxonomy, but my custom taxonomy is showing as sub menu under custom pos type, here is example what I ...
0
votes
1answer
324 views

in_array function Problem

Im writing a custom plugin, which will do different stuff for specific admin usernames. So admin will be able to choose couple admin usernames in plugin settings page in backend via repeateable text ...
1
vote
1answer
4k views

500 internal server error on wp-admin only

I am getting a 500 internal server error when I try to log into www.mysite.com/wp-admin/ and www.mysite.com/wp-login.php. The actual site is up and running just fine so it cannot be a database error....
0
votes
1answer
86 views

Margin problem on management menu?

I'm developing a Wordpress site (www.costactiva.com). It's a multilingual site with around 15 languages at the end. I found this 'mistake?' in the Menus area: When I have more languages than they fit ...
0
votes
1answer
1k views

How to get specific page screen ID

Is it possible to get the screen id of a specific page? I've search on google and couldn't find anything related to specific page screen ID I'm not looking for the get_current_screen() ID or the ...
0
votes
1answer
687 views

Developing a plugin where users can edit entries saved in database

it's the first time I'm writing a plugin. So far, it creates a table in database on activation, users can add entries to database and they can check saved entries. I've added Edit and Delete links ...
0
votes
2answers
267 views

Adding admin top-level menus

I am writing a plugin (Github Link) and have trouble setting up the titles of the admin menu. I defined a top header menu with add_menu_page (link to code, same as below) and 2 children with ...
0
votes
2answers
62 views

Output the admin menu_position for each item

Is there a function I can use which will temporarily output the menu_position of every item in the admin menu? While trying to reorganise the admin menu, the single largest thing slowing me down is ...
1
vote
2answers
80 views

Declaring <?php ?> in variables [closed]

I need to put the PHP <?php global $' . $icon_var . '; echo $' . $icon_var . '; ?> inside the variable of a custom menu structure, but it gets commented: <a href="http://slembas.esy.es/">...
0
votes
1answer
81 views

Separating a custom taxonomy from blog post-type

Whenever I invoke register_taxonomy in my site's custom plugin, all taxonomies are created as children of the blog post-type in WordPress by default. I just want them to be top-level items in ...
3
votes
1answer
82 views

Is there a way to keep a custom menu expanded when editing a custom post type?

I am building a plugin that has a custom menu with pages under that menu. A few of those pages are custom post types. I would like to have the main menu stay open when I am on one of those custom post ...
0
votes
3answers
1k views

jQuery datepicker not showing on admin menu

Nothing happens when I select the datepicker field. This is the code for the field: <input id="sticky_date" name="sticky_date" class="datepicker hasDatepicker" type="text"> The javascript ...
1
vote
1answer
967 views

Show media-frame-menu on custom Media Frame

I have a plugin I built that adds a custom media frame with the following: media_frame = wp.media.frames.media_frame = wp.media({ title: 'Select your images', button: { text: 'Use Image' }, ...
0
votes
1answer
549 views

Duplicate “Pages” Item in Admin Menu

I'm registering the following post type: register_post_type( 'post', array( 'hierarchical' => true, 'public' => true ) ); Now I have duplicate "Pages" menu items in WordPress ...
1
vote
1answer
321 views

How to remove menu installed in wp-admin by a theme? [closed]

I installed Placester theme.And then disabled it, and deleted it. But there is still a menu there. How can I remove it? The only installed plugins are: Akismet Contact Form 7 Google Analytics by ...
0
votes
1answer
161 views

Plugin option for input box validation

I'm crating a plugin option page from the code below. However, it does not explain how to get validation on the input fields. How do I get validation on id_number for NUMBER ONLY? https://codex....
1
vote
1answer
618 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 ...
0
votes
1answer
476 views

How can I move Customizer menu item to first level in WP Dashboard?

How can I move Customize menu item from Appearance menu to first level menu items in WordPress dashboard so it would be below Appareance menu? Also how can I change the name Customize?
2
votes
1answer
832 views

reorder plugin menu position

Looking for a function that I can use to reorder the admin position of a 3rd party plugin, and that will still work once said plugin gets updated. Backstory AIO webmaster and All In One Events ...

1
3 4
5
6 7
12