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
3 votes
2 answers
1k views

Admin pages have no content

Not the usual white screen of whatever horror, my site is shown normally until you go to the admin dashboard. While the dashboard (or the admin menu if you will) is visible and responds accordingly, ...
Matt Cocker's user avatar
3 votes
1 answer
2k views

difference between add_object_page and add_menu_page

According to Codex, the add_object_page "essentially does the exact same thing as add_menu_page() in case you're wondering". So.... what is the difference between those two functions?
Alexander Bird's user avatar
3 votes
3 answers
951 views

How to disable admin flyout menus?

Seriously, I hate flyout menus with a passion, and now they're popping up all over the place in the admin screen. (They are particularly heinous when you use the blue admin theme, because they add a ...
Dan Gayle's user avatar
  • 6,116
3 votes
2 answers
299 views

Theme editor menu item refuses to go away

I've got an action set up on admin_menu to modify it as needed. I successfully removed the themes menu with the following: remove_submenu_page('themes.php', 'themes.php'); Now I want to get rid of ...
brgi's user avatar
  • 31
3 votes
2 answers
3k 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', '...
Alex's user avatar
  • 31
3 votes
1 answer
194 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 ...
aberkow's user avatar
  • 240
2 votes
3 answers
19k views

Remove Custom Post Type menu for non-administrator users.

I've been researching this all day and haven't come up with much results. I want to restrict who can see my Custom Post Types by User Level (or some other way). So if the person logged in is not an '...
jetDL's user avatar
  • 123
2 votes
5 answers
4k views

How to prevent parent admin page from appearring as a child admin page

I am using this code: add_menu_page($page_title, $menu_title, $this->capability, $menu_slug, $function); Which is adding top level admin page. When I add: add_submenu_page( $menu_slug, 'sub menu ...
Mild Fuzz's user avatar
  • 4,170
2 votes
2 answers
4k views

remove_meta_box for all post types doesn't seem to work

To remove a metabox from all post types at once, using a foreach seems like the logical thing to do. However it doesn't always work and I don't understand why. For examlple viewing the "Post" post ...
Bryan Willis's user avatar
  • 4,419
2 votes
3 answers
42k views

Why I can't change the permalink of this page?

I have the following problem with a permalink: if I open this page (it is implemented as a static page) on my local website: localhost/wordpressAsper/archivio it automatically change it into http://...
AndreaNobili's user avatar
2 votes
2 answers
13k views

How can I get an array/list of all current WordPress Admin Menu items?

I would like to somehow retrieve a list of all current admin menu items, even the ones created by themes/plugins. Is it possible?
bryceadams's user avatar
2 votes
1 answer
23k views

Retrieve and display data from custom db table in admin area?

So, i'm having a bit of an issue with a plugin i'm developing, I wonder if anyone can shed any light on the situation, as many, MANY searches have come back with zero help. :-/ Basically, my plugin ...
prettyfly's user avatar
  • 226
2 votes
1 answer
3k views

Add number new posts (post_status = pending) to administration menu [duplicate]

What I have: A custom post type. A front end posting form which creates new posts with post_status = pending until they are manually reviewed and status changed to published. What I need: While I can ...
Ronnieinspain's user avatar
2 votes
2 answers
3k views

Admin Menus - Name Menu different from first Submenu [duplicate]

I am creating a submenu with the following code: add_action( 'admin_menu', 'jp_create_admin_pages' ); function jp_create_admin_pages() { add_menu_page( 'Members', 'Members', ...
William's user avatar
  • 545
2 votes
1 answer
7k 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, ...
Kenny Wyland's user avatar
2 votes
4 answers
2k views

How to make pages metabox display all hierarchy in menu admin?

Running WP 3.9.1 I've got lots of pages and sub pages. When I get to create menu lots of sub pages doesn't display on the right level, but some do? This is how the pages metabox is displayed The ...
pyverret's user avatar
2 votes
6 answers
12k views

Edit Page or Post from Top Admin Bar

I'd like to be able to edit a Page or Post that I'm on in Wordpress rather than go to the admin panel on left and find the page or post. I somehow think it used to be there, but when I navigate to a ...
dreamgrowers's user avatar
2 votes
1 answer
5k views

How to add Font Awesome 5 icons in WP Admin dashboard menu?

If you are currently using or looking to start using Font Awesome in your theme to get icons for your dashboard menu, but the icons you are wanting to use are in Font Awesome 5 and the version 4 ...
mcphersonjr's user avatar
2 votes
2 answers
12k views

Add a Menu Link (to a Wordpress Page) in the Admin Menu/Sidebar

I am trying to add a link, in the Admin Sidebar, that links to one of the pages I've created in the PAGES section. For example, I've created an ABOUT page. So in the sidebar I would like a link to "...
codeview's user avatar
  • 455
2 votes
2 answers
4k views

Custom Post Type and taxonomies's labels localization not working

after a few hours serching on the net I decided to ask here my problem. I'm in a multi site environment and I have this custom post type code: $products_labels = array( 'name' =>...
user2660802's user avatar
2 votes
2 answers
2k views

How to minimize WP dashboard menu programmatically?

I'd like to programmatically (either with js or php, but I imagine it'd simpler with js) hide the dashboard admin menu using the same functionality that is already built in. All I want is, when the ...
WagnerMatosUK's user avatar
2 votes
1 answer
2k views

Re-ordering Admin Submenu Sections

I was looking at the method below to reorder the Admin Menu Sections: https://wordpress.stackexchange.com/a/1220/1044 ...and was wondering if it's possible to reorder the submenu sections using ...
Giraldi's user avatar
  • 1,465
2 votes
5 answers
4k views

how to only have one custom post type post?

Is it possible to limit a CPT to just one? What I'd like to accomplish is creating a CPT called "Home". It will manage any and all elements on the home page. I want to program it so when the user ...
Steve Fischer's user avatar
2 votes
2 answers
5k views

How do I remove the entire Media section from the main WordPress navigation without just hiding it?

I would like to remove the entire "Media" section from the main WordPress admin navigation ont he left hand side. What I don't want to do is just "hide" it with CSS or a plugin/function like I have ...
Andrew's user avatar
  • 1,163
2 votes
2 answers
2k views

Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page

(Moderator's note: Original title was "Getting error: You do not have sufficient permissions to access this page. Trying to build custom plugin") I'm trying to write my own custom WordPress plugin, ...
Elitmiar's user avatar
  • 207
2 votes
3 answers
2k 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 ...
Greeso's user avatar
  • 2,166
2 votes
2 answers
1k views

how to only add a top-level admin menu without it creating a sub-level-menu

Here is a the code snippet: add_action( 'admin_menu', 'travel_site' ); function travel_site(){ add_menu_page( 'Travel Site Menu', 'Travel Site', 'manage_options', 'travel-site-menu', '...
dave's user avatar
  • 133
2 votes
1 answer
638 views

Backend option to include a javascript file on specific pages?

I am working on a template that my coworkers will be using to populate content. On some of the pages there will be a slider or multiple sliders but on other pages there won't be any. Because of this, ...
APAD1's user avatar
  • 405
2 votes
1 answer
2k views

Is it possible to add a filter for the output of nav-menu items in admin?

I want to remove certain input fields on the admin screen for nav-menus for specific menu positions. I've used filters to filter front-end output but not for admin output. Is there a filter available ...
tommyf's user avatar
  • 395
2 votes
1 answer
6k views

How can I use a different default admin menu icon for custom post type?

For a particular custom post type I'm setting, I simply want to change the default icon to the wordpress pages icon (menu-icon-page). I know I could upload my own pages icon and point to it, but can ...
timshutes's user avatar
  • 1,010
2 votes
2 answers
12k views

Remove menus and submenus

So I found some handy snippets to help remove admin menu items. However, I'm having trouble with the sub menu items. I want to keep the appearance menu, but get rid of the Themes, Widgets, and Editor. ...
Alex's user avatar
  • 23
2 votes
3 answers
10k views

How to remove the Tools menu item from the WP-Admin menu

Where is function.php is stored and built? I want to remove menu named as tools from mysite from all user like admin and other user's? I Request you please help me out from this problem.Give me the ...
Er.Sandeep Pal Singh Grewal's user avatar
2 votes
2 answers
144 views

Unified Approach for Placing Option Pages

Currently, it is up to any plugin's author as to where to put a link to the plugin's option page. I have seen at least the following "solutions": Plugin list Dashboard menu Plugins menu Appearance ...
Raphael's user avatar
  • 514
2 votes
1 answer
749 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. ...
user8463989's user avatar
2 votes
1 answer
3k 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', '...
Faysal Mahamud's user avatar
2 votes
1 answer
2k 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 ...
Hermants's user avatar
  • 501
2 votes
1 answer
2k views

Removing Wordpress Plugin Menu Item for a specific user

I want to remove certain dashboard menu times for a specific user. Now this menu consist of plugin menu items as well. One particular plugin I want to hide from the user is Contact Form 7. Here is ...
DextrousDave's user avatar
2 votes
1 answer
7k views

Admin Menu - Highlight top-level menu when on a sub-menu page (without showing sub-menu)

This is the current situation: I am writing a plugin that has a top-level menu page The plugin also contains other sub-menu pages The sub-menu pages are not assigned a parent slug (thus they do not ...
Jayawi Perera's user avatar
2 votes
1 answer
2k views

Add Admin Menu Inside Construct or Init

I thought I was making headway in my WordPress Development education until I ran across the Boilerplate for WordPress plugins and it uses a class object. I'm fine with that and understand those ...
clockwiseq's user avatar
2 votes
3 answers
285 views

Rename W3 Total Cache admin menu

I'm developing a plugin that I'll install for all my clients to make WordPress slightly easier to use for them. One of the things it will change is name of the W3 Total Cache Admin menu from "...
kristofferR's user avatar
2 votes
1 answer
6k views

How to add another page in appearance tab of admin panel?

Currently I am working on Wordpress and I want to know can I add 1 more page in admin panel appearance menu so that it looks like this: ? Appearance Themes Widgets Menus Editor I want to add ...
rajeshrt's user avatar
  • 135
2 votes
2 answers
151 views

Using menu_position to add two entries between Dashboard and Posts

We're looking to add two new (custom post type) entries between Dashboard and Posts. In this project, for the end user, two items are going to be by far the most used items in his dashboard. So we ...
hawbsl's user avatar
  • 500
2 votes
1 answer
247 views

Admin page menu keeps bugging out

I've been having a problem with my WordPress installation on my Debian LEMP VPS. On the WordPress admin page (example.com/wp-admin/index.php) all the items on the left menu bar keep displacing ...
GiggleSquid's user avatar
2 votes
1 answer
2k views

add function to saving change on Options Pages

i make page like this link and it work fine but i need to run some script after it like editing a file i was add it to function my_function() { //do something } function register_mysettings() { ...
hooman's user avatar
  • 23
2 votes
2 answers
2k views

Wordpress add_options_page() function not considering role

I am new to WordPress plugin development and i am stuck at why the wordpress function add_options_page() is not accepting role. This is my code which is not working add_action('admin_menu', '...
Shairyar Baig's user avatar
2 votes
1 answer
1k views

How to add new tab to admin list of posts and handle result list

The goal is to show posts with special values of custom field (post meta) in separate tab. I know how to add new tab, here is a code: add_action( 'views_edit-post', 'remove_edit_post_views' ); ...
Cookie Monster's user avatar
2 votes
1 answer
5k views

add_submenu_page set for multiple roles [duplicate]

I have this string: add_submenu_page(basename(__file__), 'Events', 'Colloqui', 'subscriber', 'BW_events', 'BW_events'); How can I let this be available to editor(s) too? I tried ... ...
MultiformeIngegno's user avatar
2 votes
2 answers
465 views

How to determin which admin screen/sub screen I'm currently viewing

Edit: The Q narrowed down to the following: "How would I retrieve the screen IDs of all admin UI screens at one time?" Edit: I added a bunch of more plugin globals. Q is the following: Check ...
kaiser's user avatar
  • 50.6k
2 votes
3 answers
887 views

Bootstrap doesn't work on admin menu page-How to override wp-admin style?

I am building a plugin and i use bootstrap to style it but i notice some components styles don't work properly.Someone suggested in a blog post to use wp_deregister_style('wp-admin'); which did fix ...
Ioannis Perpirakis's user avatar
2 votes
2 answers
1k views

How to Add a Link to the Drop-Down User Menu in the Admin Bar?

I need to add a link to the drop-down user menu in the admin bar. Is there a hook or function for this?
user avatar

1 2
3
4 5
13