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 ...

learn more… | top users | synonyms

18
votes
5answers
9k views

How do I enqueue styles/scripts on certain /wp-admin pages?

I have two simple functions that load stuff using wp_enqueue_style() and wp_enqueue_script(), something like these: function admin_custom_css() { wp_enqueue_style( 'stylesheet_name', ...
17
votes
3answers
26k views

Changing Admin Menu Labels

I have spent the last day using the functions.php file to fully customize WordPress for my client sites. I am amazed at how much I have been able to accomplish and how much easier it will make things ...
14
votes
4answers
9k 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. http://lab.yukei.net/wp-code/nav.html?wp-admin/menu.php.source.html Any ideas?
11
votes
6answers
6k views

Is there ANY way to remove comments function and section totally?

I don't want any comment querys to run. I don't wont anything about comments to be shown in wordpress admin area. Is this possible in any way? EDIT: Remove all links to the comments from admin bar, ...
11
votes
2answers
2k views

The Great WordPress Admin Menu Challenge of Jan 2011 (a.k.a. How to Resolve Some Challenges when Modifying the WordPress Admin Menu System?)

This question is a bit unique. It is in part a "challenge" I'm issuing to the WordPress team (or anyone else) related to trac tickets: #16048, #16050 and #16204. The Goal The goal is to get around ...
9
votes
1answer
5k views

Adding Category/Tag/Taxonomy Support to Images/Media

I've been trying to add category, tag, or custom taxonomy support to images (or all media, though I'm only concerned with Images). I've got it part-way figured out with: add_action('init', ...
8
votes
2answers
201 views

Displaying the number of updates available in the Admin area

I am having an issue finding out how to display the number of plugins/updates available to call somewhere else other than the admin header. I found the function wp_get_update_data should be what I ...
7
votes
1answer
3k 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 ...
7
votes
2answers
128 views

Are there any reasons you can't use strings for admin menu positions?

When interacting with the admin menu, for instance via add_menu_page, there is a $position parameter. The inline docs indicate that this should be an integer. The Codex agrees, but adds a note that ...
6
votes
3answers
5k 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 ...
6
votes
2answers
989 views

Getting custom admin submenu item to highlight when its active

I have a custom post type, Jobs, with 3 taxonomies under it in the Admin menu. One of the taxonomies is Status, which is either Active or Closed. I want a menu item under Jobs for Active Jobs. I ...
5
votes
3answers
4k views

How to remove entire admin menu?

I need to customize the admin panel for my user. So how do I remove the entire admin menu? Not remove the menu item, I mean entirely remove the left vertical menu bar, include the design of the menu ...
5
votes
1answer
733 views

Put update-like notification bubble on multiple CPTs menus for pending items

Much like how the Plugins or Comments menu items have these number notifications in a bubble for updates and unmoderated comments respectively, I'd like to use that bubble to display the number of ...
5
votes
2answers
5k views

Remove “posts” from admin but show a custom post

After checking out: http://codex.wordpress.org/Function_Reference/remove_menu_page, I successfully use the following code to hide some stuff from the menu: add_action( 'admin_menu', ...
5
votes
5answers
2k views

Add separator to admin submenu

I would like to add a separator to the admin submenu section, NOT in the top level section. I'm thinking of using javascript and styling to do the job, but I was wondering if there's a more ...
5
votes
2answers
1k views

Modify Admin Bar Link

Starting on line 474 of /wp-includes/admin-bar.php there is a function that is declared as the following: function wp_admin_bar_new_content_menu( $wp_admin_bar ) What it does it generates the + New ...
5
votes
4answers
287 views

Add my own button next to “Screen options” and “Help” in the admin

I'd like to add my own button link next to these two. Is this possible?
5
votes
1answer
153 views

How to show custom menu items in the WordPress android app?

I hope this is the right .SE site for this question. When on the road I want to use the Android WordPress app to write short snippets of articles for later use. My blog has some custom article ...
5
votes
2answers
789 views

Meta Boxes: 'admin_init' or 'add_meta_boxes' hook?

When setting up meta boxes in a custom post type I've been do so using the add_meta_boxes hook, e.g. add_action('add_meta_boxes', 'meta_box_setup'); function meta_box_setup() { add_meta_box( ...
5
votes
3answers
4k views

Passing arguments to a admin menu page callback?

Situation: I'm working on a plugin and I'm developing it as a class, everything worked fine until I run into this situation. I wanted to make things a bit cleaner and tried this.. class MyPlugin { ...
4
votes
5answers
4k views

How to remove admin menu pages inserted by plugins?

I've got the following code, which cleans up a lot of stuff that is not going to be used within the admin area: add_action( 'admin_menu', 'my_remove_menu_pages' ); function my_remove_menu_pages() { ...
4
votes
4answers
15k views

Plugin to remove Admin menu items based on user role?

I searched high and low for a plugin that can remove/hide Admin menu items , including custom post types and taxonomies, based on user role. Every one I have tried only does a global hide, not based ...
4
votes
3answers
493 views

What's the best method for emptying an option created with the Settings API?

I'm trying to empty an option created with the Settings API and failing. update_option ( 'my_option', '' ); appears to do nothing, whereas delete_option ( 'my_option' ); destroys the whole option ...
4
votes
1answer
1k 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' ); ...
4
votes
1answer
726 views

Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?

I am making a plugin and I have a bunch of different data types that I am creating edit pages for. I'd rather not have to create a separate function to add each one to the admin menus, since they're ...
3
votes
4answers
2k 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 ...
3
votes
1answer
402 views

How Do I Programmatically Better Organize Custom Post Type Menus?

A project I inherited had a dozen custom post types. Trouble is, they all come off the admin menu sidebar separately. It's not very tidy. Is there a plugin where I can make these subitems of a parent ...
3
votes
1answer
1k views

Is it OK to move admin menu items?

I have a site with eight custom post types. Each is registered with 'menu_position' => 5 (below the Post menu). A side effect of having more than four CPTs is that the Media menu now appears in the ...
3
votes
3answers
2k views

How to check if an admin (sub)menu already exists?

The title says it all. I'm using WP 3.0.4
3
votes
2answers
924 views

Overwriting Core Wordpress Functions with Plugins

Is there a way to overwrite a core function is the Wordpress core using a plugin? I don't need to inject code, I need to replace the function entirely with a re-written version. The specific function ...
3
votes
1answer
2k views

Generate Advanced Custom Fields box in custom admin menu page

I have created an custom admin menu page called FCC Youtube with add_menu_page function which has some custom fields I manually generated via HTML and PHP: code ( just the part how I created this ...
3
votes
1answer
198 views

How Can I remove or hide the export page in WordPress menu?

I'm trying to remove the export.php page from WordPress admin menu -> tools for a multisite so only the network admin could see it I have the following code so far but can't get it to work. ...
3
votes
1answer
597 views

Admin menu as submenu from another plugin

I would like to add my new developed plugin's admin menu to an existing plugin as sub menu. Would be possible to do this? In my first plugin I initilize the menus as follows: function add_pages() { ...
3
votes
1answer
344 views

Add highlighting to new Admin Dashboard Menu Item

I have implemented a Custom menu item in my wordpress dashboard using the following command in the functions.php function create_menu() { $settings_page = add_menu_page('Edit_Post_69', ...
3
votes
2answers
903 views

Naming Admin Menus and Submenus

I'm building a plugin that requires its own set of admin pages. I know how to create the top-level link and how to add sub-menus to it. However, what seems to happen is when I create the top-level ...
3
votes
3answers
318 views

How to wrap admin menus and menu headers in additional divs without modifying the WordPress core?

I need to do this to enable advanced styling options via css, the one a class the headers are wrapped in isn't adequate to do the type of styling needed. Thanks!
3
votes
2answers
1k views

Remove duplicate main - submenu in admin?

When I use add_menu_page & add_submenu_page to add menu items, add_menu_page( 'Forms', 'Forms', 'administrator', 'forms', 'forms_job_menupage_cb' ); add_submenu_page( 'forms', 'Job Applications', ...
3
votes
1answer
121 views

Plugin View Details Link

How do I get the [View details] link to appear on the Plugin admin page in the Description area? The plugin is working fine, the version and authors (with links) show up fine, but no [View details] ...
3
votes
1answer
632 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 ...
3
votes
2answers
595 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 ...
3
votes
2answers
244 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 ...
2
votes
3answers
9k 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 ...
2
votes
1answer
4k views

Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu

I currently developing a wordpress plugin that is using two custom post types. What I want to know here: is it possible to add a custom post type menu as another custom post type's sub menu?
2
votes
2answers
664 views

Wordpress Admin Tooltip hooks

I want to know if there is a way to use Wordpress Adminitration Tooltips (de gray and blue ones) that are shown one you update your worpdress (3.x). Showing the new features. Thanks!
2
votes
2answers
990 views

Can I have Post Types under other Post Types in Admin menu?

Lets say I have created two custom post types A and B. Those post types are displayed in the Admin menu one after another. (After Posts for example) Is there a way to display B under A? The only ...
2
votes
1answer
2k views

Creating a WordPress admin page without a menu for a plugin

I am writing a plugin, that will list a number of entries from a custom set of tables. I added the main page for the plugin using the following WordPress functions: // Add menu and pages to ...
2
votes
1answer
4k views

Adding a custom admin page

I want to add a page of content (a readme file) in the WordPress admin, I can't seem to find how to do this in the codex - can anyone point me in the right direction? It will literally just be a ...
2
votes
3answers
2k 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 ...
2
votes
5answers
974 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 ...
2
votes
3answers
5k views

What is the recommended way to create plugin administration forms?

I have seen and been using the following technique for adding php scripts to my plugin for handling custom forms in a wordpress plugin. from the quizzin plugin: $code_pages = ...