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
272 views

Plugin - Admin menu page broken url

I'm working on a plugin.I've created a new menu entry inside my functions.php. The basic idea will be to have a default menu which will be the parent of several, small and different plugins. I have ...
2
votes
1answer
2k views

add_menu_page() with function inside a class [duplicate]

I'm an experienced dev, but new to WordPress. I'm following along with a course on udemy and they suggested I encapsulate my plugin functions in a class to help avoid namespace conflicts. However, ...
1
vote
1answer
137 views

Add a background image for Custom Post Type archives page

I have a Custom Post Type "Vacancies". I have successfully created a Sub Menu Item in the admin menu "Background". I would like to show a file upload form to allow the admin the ability to upload a ...
0
votes
1answer
18 views

admin aoolbar add_node() and pulling in my post slug

I have created custom post types that use custom endpoints to load the correct template based upon the content the user is viewing. I created custom Admin Toolbar menu items. $wp_adminbar->...
1
vote
0answers
18 views

Show existing POST categories as items in the sidebar menu [closed]

For a cosmetics site, we have "Post" categories such as Deals, Skin Care, Body Care. All our content is saved as posts, in those categories. So all these posts show in the Posts menu in WP Admin, and ...
0
votes
1answer
41 views

How to have submenus collapsed until they are clicked?

I have couple of main admin menus and sub-menuse underneath them. Main menu1 Sub menu 1 sub menu 2 sub menu 3 Main menu2 Sub menu 1 sub menu 2 sub menu 3 Like ...
0
votes
1answer
898 views

How to use add_submenu_page() for editors?

Currently I load a custom WooCommerce sub menu point in an own plugin like: // Add an additional submenupoint add_action('admin_menu', 'register_mycustom_menupoint'); function ...
0
votes
0answers
514 views

open modal window

I am working on a site where HR employees are managing applicants for jobs. I'm currently trying to add a modal window on a custom admin dashboard that will let a user quickly change an applicant's ...
0
votes
1answer
439 views

the menu of the network does not display my second website

I have a problem that is not referenced anywhere. In the toolbar, the menu of the network does not display my second website, while it is active and appears in the list of the sites in the network. I ...
0
votes
0answers
568 views

Remove menu item dashboard for a unique user

I want to disable access to some pages like "Themes" or "Plugins" for my client (just his ID) and try to do it in the functions.php with this script: EDIT : WORKING CODE : function hide_menu() { ...
3
votes
1answer
858 views

Remove Pagination in Appearance -> Menus -> Categories

is there a way to remove the Pagination in the Wordpress Menu Editor? I have something like 200 categories in my blog and customising menus seems to be tricky when you have to click through it to ...
0
votes
2answers
389 views

how can i add custom menu in admin panel?

I am trying to learn how to make themes for WordPress now I am unable to find how to make a custom menu in admin panel related to theme option want to show a menu in this admin panel
0
votes
1answer
370 views

add submenu page doesn't display

I can't display the submenu of my menu when creating a plugin (Beginner). Could you please help me to find my error? My plugin is well activated and the menu_page appears well add_action('admin_menu',...
1
vote
1answer
633 views

Ajax in plugin settings page returns 400 Bad Request

I've read a bunch of questions and copied my code from the codex, but still no luck. I get this error message when I hit my submit button: my php functions and JS looks like this: function ...
3
votes
1answer
2k views

How to add notification bubble for my custom admin menu page

I created my own contact form and I'm using WP_List_Table to display submitted forms in wp-admin. I edited this example WP_List_Table from github and it works fine. This is how I add my custom admin ...
0
votes
2answers
62 views

Some menu items wont budge

add_action('admin_menu', 'remove_admin_menu_links'); function remove_admin_menu_links(){ $user = wp_get_current_user(); if( $user && isset($user->user_email) ...
1
vote
0answers
113 views

Possibilities for the edit.php admin panel? [closed]

Here's my scenario: I'm building a Wordpress backend that links two custom post types for an HR department: Job Listings and Applicants. Job Listing posts are created manually by the HR admin. ...
0
votes
1answer
74 views

Moving the WordPress dashboard avatar over the admin menu

Is there any documentation on moving the avatar image to the top of the menu area in the WordPress dashboard?
0
votes
1answer
19 views

add an option to the read page

I want to add an option to the static page in the admin read page. I want to add a Portfolio page option where the user can select a page to set as portfolio page. Google helped me somewhat with ...
1
vote
0answers
21 views

Polylang : Interverting languages after development [closed]

My client asked me to switch French and English after the site was developed. So I did two things: Polylang > Languages: I selected English by default (asterisk on English) Polylang > Settings: I ...
0
votes
1answer
410 views

Admin - Custom Post Type in WooCommerce menu - how to control menu order

I'm using WordPress 4.9.1 and WooCommerce 3.2.6. I have added a new Custom Post Type (Subscriptions) and inserted the menu item under the 'WooCommerce' menu in the admin panel using 'show_in_menu' =&...
0
votes
0answers
61 views

How to display status messages in admin panel

I recently followed the steps here https://codex.wordpress.org/Settings_API in order a create a setting page for my theme. The code works, the data gets saved in the database without any status ...
3
votes
1answer
273 views

renaming an admin menu item with decimal array index number

I am trying to rename a menu item on my administration dashboard. Using the $GLOBALS['menu'], I have found the following array indexes [26.0648] => Array ( [0] => M.E. Calendar ... and [26] ...
0
votes
1answer
23 views

pre-existing data, and entities

I'm new to WordPress, and I would like your opinion about the application I'm building. I have a database filled with a lot of data structured in a very nice and optimized entity design. I'm ...
0
votes
1answer
66 views

admin menu: use default “general” page for theme settings using add_menu_page and add_submenu_page

How can I make my theme settings admin menu showing "general" as default page while keeping its menu title as "theme settings"? I mean at the moment I got this using add_menu_page and ...
0
votes
0answers
74 views

Add Admin Option w/ Anonymous Function

Been working on a method for my Custom Post Type PHP Class to add a submenu page to the Admin Menu for use in the template. The add subpage method is as follows: /** * Adds a sub menu to the ...
0
votes
1answer
287 views

Creating Admin Submenu Page via Class Method

I have a PHP Class I created that handles creation of the custom post type, custom taxonomies, and meta boxes and custom metadata fields. My next step is to add the ability to create subpages under ...
1
vote
1answer
346 views

rewrite custom post type slug in wp admin

I'm developing a site that will eventually have a copy, a separate WP install in another language. I have a few custom post types in this site, some of them with custom slugs for archive page and/or ...
0
votes
1answer
731 views

adding existing menu page on new customer user role

I have created new user role 'Host' . now I am trying to show admin menu item ' user' in it . i have googled some code and tried this $result = add_role( 'Host', __(Host), array( ...
1
vote
0answers
21 views

Manipulate javascript code from custom made admin page menu

I have javascript peace of code that I load into my custom template page. It is quiz application based on pure javascript and I keep the questions with answers inside the array object. The thing is ...
2
votes
1answer
611 views

wp_verify_nonce() why return false?

I was to tried create theme options admin page (without settings API) in this code I'd like to know why wp_verify_nonce return false: main file <?php add_action('admin_menu', '...
0
votes
0answers
188 views

WP_User object behaving strangely when used inside Admin Panel?

I'm building a custom settings page in the WordPress Admin Panel and I'm pulling some data from a WP_User object at one point. I've used this object dozens of times in the actual theme, but in this ...
0
votes
1answer
259 views

Creating custom admin panel pages without making a plugin?

I have some functionality on my site that I'd like the administrators to be able to handle without going directly into the database. I'm thinking that the cleanest way would be to create new pages ...
0
votes
1answer
1k views

meta box on new admin page

I created a new page for the homepage settings of my theme using add_pages_page(). On that page I want to use wp.media to let the user select one or several images from the library (or upload new ones)...
0
votes
1answer
239 views

no themes or editor under appearance menu

I inherited a site which does not have all of the menu items under the appearance menu in the toolbar. Specifically themes (trying to upload a new theme my client purchased) and editor. I have: ...
3
votes
2answers
148 views

custom admin menu with custom filed

i am not so expert on WordPress yet. I want to create custom admin menu section for my project. For example see the attached image marked red area, there i want to add one section name Project under ...
0
votes
1answer
172 views

add menu page in loop menu order

I have a function that creates custom admin menu items from an array of child pages. They seem to get returned in alpha-numeric order. I would like them to get sorted by the page order set in page ...
0
votes
1answer
280 views

How to redirect one admin URL to another when admin page URL has “/admin.php?page=” in it?

The following code (from here, middle section chopped out) allows me to redirect users who land on a certain page in the WP admin to another admin page... function admin_redirects() { global $...
0
votes
0answers
28 views

Which method is more correct for removing WooCommerce Extensions menu item?

Both of these methods remove and restrict access to the WooCommerce "Extensions" menu page in the admin, which is what I want. But which method is more ideal? By removing it (option 1) or by ...
1
vote
0answers
19 views

How do I insert the smaller variant of an image?

I noticed that when I upload an image in my media library, WordPress seems to automatically generate smaller versions of the image: However, I don't know how to access these smaller versions when I ...
1
vote
1answer
70 views

Add Custom Post type menu to another menu in specific location

It is possible to add the menu for a custom post type beneath another menu (in my case a custom one that I have created) but this appears as the first item. How exactly do I move this to a different ...
0
votes
1answer
349 views

Disable flyout (popup) menus in backend

In wp-admin backend, if I hover my mouse over a menu at the left, it popups with submenus. I am absolutely able to click the menu myself, if I want the submenus to show up. So I am searching a way to ...
0
votes
1answer
2k views

How to remove default tag and category options form a custom post type admin menu

In my theme I have added a custom post type and in the admin side the new CPT menu shows default categories and tags above the new CPT categories and tags. Question how do I get rid of the default ...
0
votes
2answers
262 views

Removing custom taxonomies from the admin menu

I have made custom taxonomies that I am using for few different post types: <?php add_action('init', function() { register_post_type('intranet-categories', [ 'labels' => [ ...
0
votes
1answer
80 views

How do I add an options page at the bottom of the list?

I'm working on my first plugin, and I'm using something like this to add a submenu under Settings: add_options_page( 'Page Title', 'Menu Title', 'edit_theme_options', 'my-plugin-menu-...
0
votes
1answer
113 views

Wordpress plugins add parent menu option in admin main right

I need to add a menu item but it is available as a parent item, I am trying it as follows but in the menu option it is shown as the child of the parent item Settings> My plugins name: add_action( '...
0
votes
1answer
880 views

How to override post-new.php with custom template

How can i override post-new.php with my custom template. When i include file or simply redirect i see my template but admin sidebar is missing. I know it is not simple.
0
votes
1answer
25 views

My connecting URL form in html to PHP does not work

as my previous question here maybe miss lead, my code does not work, what am i missing, i write in functions.php then, i call in header.php this is my form in functions.php: <form name="formvideo"...
0
votes
1answer
36 views

How to get value from custom backend menu

So, i have to put this <iframe width="560" height="315" src="https://www.youtube.com/embed/qMSxYtrZS-c" frameborder="0" allowfullscreen></iframe> into header.php line 305 as shows like ...
0
votes
1answer
810 views

WordPress Admin Menu Order for 'admin.php' pages

I'm using following code to change menu order of WordPress admin panel. function reorder_admin_menu( $__return_true ) { return array( 'index.php', // Dashboard 'separator1', // -...

1 2
3
4 5
12