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
1k 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
15 views

Update displayed File URL in Media Library modal when it's changed

I've added a Select custom field for all Attachments using Advanced Custom Fields plugin. When user selects something in that field, the attachment file is moved to a sub-folder, so the path changes ...
4
votes
6answers
7k views

Removing an admin page added by a 3rd party plugin. Gravity forms in this example

I'm trying to hide a help page from editors, added by the gravity forms plugin. I believe I've run into the same issue before with other plugins, so I'd like to know the correct way to do it for 3rd ...
1
vote
1answer
691 views

How To Remove or Hide Appearance->Background from Admin Menu

I have a menu Appearance->Background on WP admin, i want to remove or hide from Editor user. i was try to using public function remove_menu() if( !current_user_can( 'administrator' )){ { if( !...
0
votes
1answer
602 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
1answer
15 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 ...
0
votes
0answers
22 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 ...
0
votes
0answers
6 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(...
0
votes
2answers
667 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
794 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
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() { ...
1
vote
4answers
5k views

Delete option doesn't appear for plugins

On the Plugins screen I have options to activate and deactivate plugins, but I no longer have the "Delete" option. I'm relatively sure the option appeared earlier. Also, when I hover over "Plugins" ...
2
votes
2answers
2k 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 "...
3
votes
3answers
14k views

How to hide menu on WordPress admin

I want to hide some menus on admin panel: Appearance, Plugins, and Tools. How to hide it without plugin? And how can I un-hide them later easily?
1
vote
1answer
810 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, $...
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
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=...
1
vote
1answer
698 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 ...
0
votes
1answer
35 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="...
0
votes
2answers
835 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 ...
3
votes
2answers
1k 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
29 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 ...
0
votes
1answer
14 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 ...
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' }, ...
0
votes
0answers
13 views

How to select and rearrange blocks for CPT edit page programmatically?

I set up a plugin with a custom post type. Everything works so far regarding functionality, however I would like to change the way the admin page for the CPT looks. register_post_type( '...
0
votes
1answer
23 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 ...
0
votes
1answer
16 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 ...
0
votes
2answers
2k 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)...
9
votes
2answers
8k views

Add update notification bubble to admin menu item?

I have re-worded this to make more sense. Ok, I have a plugin that uses a remote service that check for updates, much like default WordPress plugins, in this case it just checks an XML file. I want ...
3
votes
2answers
2k views

How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?

What would you recommend to use as far as manipulating the admin bar goes? I was thinking to just add a new admin bar node, and with CSS set a background image for the icon. Then in the node, just ...
4
votes
2answers
3k 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
1answer
913 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
20 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( '...
1
vote
1answer
956 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/...
1
vote
1answer
702 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
0answers
12 views

Capability for showing comments page in admin

I have created a new user role "advertiser" and added some capabilities. Advertiser has access to admin comments page /wp-admin/edit-comments.php and I need to know, which capability set to ...
0
votes
1answer
67 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 ...
0
votes
0answers
21 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( '...
0
votes
0answers
19 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 ...
8
votes
3answers
16k views

Add an admin page, but don't show it on the admin menu

I have a custom plugin 'Charts' that has it's own menu. In that menu are links to the 3 pages for the plugin - 'Charts', 'Add Chart' and 'Edit Chart'. However, I don't want to display the link to '...
0
votes
2answers
1k 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
0answers
27 views

Unable to view theme options

I am restructuring how my WordPress files are organized in order to use Composer along with tracking the theme and child theme in a Github repository. I'm following this guidance for the most part, ...
0
votes
0answers
9 views

Customize Menu Structure Creating a Section Where you can add icons/imgs

Basically i would like to add a section in "menu structure". So, when i access to any page/post i can create (for example) a select with some font-awesome icons class to every single <li&...
2
votes
1answer
936 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 ...
0
votes
0answers
33 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
0
votes
0answers
20 views

Multisite Menu Metabox to list all sites in Network for Dynamic Network Site Menuitems

I don't understand why this functionality doesn't exist in Wordpress Multisite TBH. I have this working for Custom Menus and the List of Sites on the Nework is working in a Metabox also. However, I ...
0
votes
1answer
356 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 ...
2
votes
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
1answer
24 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 ...
0
votes
0answers
40 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 ...

1
2 3 4 5
13