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
18 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 ...
0
votes
2answers
780 views

Admin menu links just refresh the page

I'm using add_submenu_page() function to add some options to my plugin. On Linux hosting everything works like it should, on Windows hosting those 5 sub-menus have same link somehow and when I click ...
6
votes
4answers
296 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 ...
0
votes
0answers
6 views

Plugin Menu appears twice in Super Admin

I am buliding a plugin and have different menu options based on different user-role in wp-admin. I have user role as Administrator, Subscriber since lastweek we had migrated to Multisite Admin and we ...
0
votes
0answers
10 views

Is it possible to have a single page on my current wordpress install under a subdomain? So editing the page is still accessed from the main interface?

I don't think multisite is functional for this for a variety of reasons (including small scale of what the subdomain would be fore, interface access, plugins, etc.) I have a single page that I would ...
0
votes
2answers
1k views

Adding direct link to post editor in admin menu

I'm trying to make a shortcut in navigation that will take user to one certain post. So far I'm using add_action('admin_menu', 'add_custom_menu_position'); function add_custom_menu_position() { ...
0
votes
0answers
12 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 ...
2
votes
1answer
903 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', '...
1
vote
1answer
1k 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' }, ...
26
votes
7answers
20k views

Add a Separator to the Admin Menu?

Does anyone know how to add an admin menu separator? I found this but it did not help. Any ideas?
1
vote
1answer
647 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 ...
1
vote
1answer
702 views

Admin custom option screen not saved unless user manage_options capability

I am running into exactly the problem described by this Trac: https://core.trac.wordpress.org/ticket/14365 I see that one of the devs added a Diff here: https://core.trac.wordpress.org/attachment/...
0
votes
1answer
701 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
3answers
585 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
670 views

Move plugin-settings to 'Settings'-menu in the admin

I hate it, when plugins add their own settings like this: It's cluttered and annoying. Can I somehow move them in under 'Settings': I imagined something like, checking if there is a plugin by the ...
0
votes
1answer
893 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( ...
0
votes
0answers
7 views

How to customize the default users page in admin panel?

I'm trying to add a new feature to the admin panel that enables filtering users using specific field. and I'm wondering is it better to add new page with this functionality or to add the functionality ...
0
votes
1answer
11 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" ...
1
vote
0answers
23 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 ...
3
votes
1answer
719 views

Admin account only shows Profile and Dashboard with no activity

I received login credentials from the person that maintains my company's website. When I login, there is virtually no information on it. I can only access the dashboard which has no activity on it. ...
0
votes
1answer
568 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 ...
0
votes
0answers
9 views

add_submenu_page - cannot change slug

I have a problem in my plugin adding a submenu. It works as an administrator user, but if I run as a user who is not admin, it will not work. I am adding my menus as below. add_action( 'admin_menu'...
0
votes
0answers
19 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')); } ...
0
votes
0answers
75 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 ...
3
votes
3answers
2k views

Adding an admin page - OOP approach not working

I have a parent class, which contains the following: use app\My_Dashboard; class My_Class { public function __construct() { add_action('admin_menu', array($this, 'setup_dashboard_page'));...
0
votes
2answers
43 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?
0
votes
2answers
620 views

Is it possible to have dynamic post id # in add_menu_page()?

I use the add_menu_page function in my custom theme builds but when I export my local copy of the site and import it in the production site some of post id numbers change and I have to update this ...
0
votes
1answer
15 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, ...
0
votes
0answers
28 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 ...
0
votes
0answers
13 views

Update JavaScript by refreshing menu in wordpress customizer

In Wordpress customizer adding or removing a new menu item refreshes that area, removing decorative details that I add with JavaScript in the preview. As seen in the image: Put this code so that ...
2
votes
2answers
1k views

How to add taxonomy to Users menu in admin?

I want to create a taxonomy that is related to the users, therefore I'd like to show the taxonomy under "Users" menu within wordpress admin. In codex there's a mention that you can attach taxonomy to "...
2
votes
1answer
897 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
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
1k views

Remove Theme menu link from Admin Panel

I am trying to remove menu from the admin panel my code works as it removes some pages but i can't remove the following. admin.php?page=ot-theme-options admin.php?page=ot-settings admin.php?page=...
0
votes
1answer
1k 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
0answers
14 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' => ...
0
votes
3answers
3k views

Remove Elementor Menu From Wordpress Admin

How to remove elementor from wordpress admin menu. I have tried below option but it didnt work. add_action( 'admin_menu', 'my_remove_menu_pages' ); function my_remove_menu_pages() { ...
0
votes
1answer
26 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(...
1
vote
2answers
58 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 ...
1
vote
1answer
721 views

Is there any way to add absolute path for add_menu_page function?

I am creating a plugin for add menu option to WordPress admin and using below function for that: <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $...
6
votes
2answers
10k views

Remove a menu item created by a plugin

I'm trying to remove a menu item and tried several approaches, but have not had any luck. It was created from a FAQ plugin. If I use this line: remove_menu_page( 'edit.php?post_type=question' ); ...
0
votes
1answer
32 views

How do I code access to the built-in UI of a CPT when it's placed as submenu of another CPT that is protected by role?

I am toying around with WordPress capabilities, and having some difficulty understanding where I am going wrong. Right now, I have an admin menu that appears for all administrators with STUDENTS as a ...
0
votes
1answer
18 views

Getting post attchment URL to populate a CPT Admin Page Column

Just trying to work out how to get the url of a file attached to a Post and displaying that in the admin page for that CPT. The file is attached to the post via an ACF file upload field called '...
0
votes
1answer
40 views

show badge with count for pending items in custom post type

This code I have is working but I am not sure if it is the right way to do this. Basically when a user adds a record to a custom post type it goes straight to pending and needs an admin to publish it. ...
1
vote
1answer
537 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 ...
2
votes
1answer
821 views

Displaying different custom post types under one admin menu

I am creating multiple custom post types that have hierarchies, and a few of them are strongly related like a parent-child. For example, a house custom post type has bedroom and kitchen custom post ...
3
votes
3answers
5k views

Run functions only in the admin area?

I'd like this code to only run inside the admin area as it is resorting the items on the public side admin bar too. /* Reorder Admin Menu to put "Pages" at the top */ function menu_order_filter($...
7
votes
5answers
13k views

Add “external” link to admin menu in the backend

Trying to add a link to my admin menu (dashboard/backend) that leads to the frontend of wordpress, so I basically want a link in the menu that takes me to the blog. I've found a couple of ways to ...
3
votes
1answer
1k 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
0answers
21 views

Redirect from wp-admin back to page

I want when i click on menu button Return to Home i made on wp-admin menu to redirect back to page: My Extra Code: [ 'parentSlug' => 'doesnt-matter', '...

1
2 3 4 5
13