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

2
votes
1answer
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', ...
2
votes
1answer
601 views

Add post-new.php?post_cat=catslug to admin menu

I made it possible to use post-new.php?post_cat=catslug in the wordpress admin for creating a new post with a pre-filled category by using the answer here: How to add category to: ...
2
votes
1answer
450 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() { ...
2
votes
1answer
506 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 ...
2
votes
2answers
359 views

How To Create User Specific Admin User Pages?

The aim is for a proposed site to have customers be able to login and be able to view a private and customer specific ADMIN page NOT frontend page (although this would be much easier to achieve). ...
2
votes
2answers
330 views

Add Post type menu to another menu

I've created a menu page in the dashboard, then I created a custom post type and now I want to put the menu of the custom post type as a submenu under the first menu page I had created. I tried ...
2
votes
1answer
109 views

check current_theme_supports in admin_menu hook

I'm adding a menu and sub-menus via the admin_menu hook in my functions.php. One of the sub-menus I want to add is menus. I want to make sure that the theme supports menus before I do that, so I ...
2
votes
2answers
702 views

Is it possible to disable certain user roles from creating tags?

As a site admin, I'd like to have control over things. I'd like to prevent my contributors and authors ( who generate content for me ) from creating new tags. I don't want that tag taxonomy to turn ...
2
votes
3answers
693 views

Change the Default Pages Menu View in wp-admin

I can't seem to figure out how to change the default view for "Pages" in the admin menu. The initial view is the "Pages" view (/wp-admin/edit.php?post_type=page) How could it change this to ...
2
votes
2answers
233 views

Custom Theme Want To Remove One Category From All Displays

I created my own custom Wordpress theme for my website, everything is great. However, I have a strange need, I have one category which is kind of a 'placeholder' for content which is automated and ...
2
votes
1answer
555 views

Updated to version 3.8 and Admin pages are very slow. How to diagnose problem?

I manage a large multi site Wordpress installation with about 300 hundred users and blogs. The server is blocked from making internet requests, so I have defined a proxy service in wp-config.php ( ...
2
votes
1answer
577 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?
2
votes
0answers
120 views

Admin menu bar dropdown opens when I click on a form <select> element (Chrome) [closed]

Whenever I click on a <select> element within a form, it opens not only the relevant dropdown but at the same time the first dropdown menu of the admin menu bar. It seems to be an issue with ...
1
vote
3answers
7k 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 ...
1
vote
2answers
2k views

Hide widgets/plugins from dashboard

I have two plugins in the dashboard, SEO Wordpress and Custom Content Type Manager, and for security reasons I want to hide these from dashboard. How to do that? I tried to hide the SEO Wordpress ...
1
vote
3answers
373 views

Highlighting a Menu Item by Post Name

With the help of a couple of users, my last two questions were highlighting a custom menu item through its ID. Now I'm trying to combine the code of the following two functions to make it work by ...
1
vote
2answers
762 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 ...
1
vote
2answers
1k 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, ...
1
vote
1answer
845 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 ...
1
vote
2answers
319 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', ...
1
vote
1answer
3k 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 ...
1
vote
1answer
931 views

OOP Plugin and Menu - Call to undefined function register_setting()

WordPress documentation seems spotty on object-oriented code. I'm setting up a few plugins and the first should register settings and a menu page. It's throwing "undefined" for the ...
1
vote
2answers
355 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 ...
1
vote
1answer
342 views

Trying to add script to specific admin page is not working

What I am trying to achieve is to load a .js file on an edit.php page, however the code is not working specifically for this page. I've applied the same code type of code to other CPT pages, but for ...
1
vote
1answer
451 views

Associating custom submenu item with post type of top level menu item

I'm working on a plugin that sets admin menu submenu pages on all different post types. I need to be able to associate these new submenu pages with the corresponding post type of the top level menu ...
1
vote
1answer
2k views

How to put placeholder text in the main post input area?

I'm making a course plugin for a university in England. I'm looking to put some default placeholder text in the main post content area, on the admin side. Its the rich text editor I want it to go ...
1
vote
2answers
5k 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. ...
1
vote
1answer
1k views

Order Admin sub-menu items?

I am adding items to a CPT Admin menu using add_submenu_page which works great, but they are added to the bottom of the sub-menu after the CPT options. I want to be able to have them on top , but I ...
1
vote
2answers
820 views

Create a admin page in wordpress without admin menus (“wordpress sidebars”)

I'm creating a new page in WordPress admin for a theme. In this new page will be a list of people registered (in a form), but with few details / information. So when a person clicks on something, I ...
1
vote
2answers
2k views

Saving checkbox/option list status?

my self-made admin panel works just fine, but it doesn't save values of form inputs. When I type something into textbox and click "save" it is still there after refreshing, thanks to PHP: <input ...
1
vote
1answer
152 views

Administration Pages Styling

I am adding administration pages using add_menu_page() function. But it wont look good. Check the image below. I would like to have it as separated and in between Appearance and Plugins section ...
1
vote
2answers
1k views

How do I create multiple post types in same menu section in WP-admin?

I am building a custom menu section (a new item with subitems in the main menu section on the left side) in the WordPress Administration of my website. The section shall include a main post type, and ...
1
vote
1answer
36 views

Why use the Settings API over a new administration menu?

I'm writing a 'quote-me' plugin which provides the end-user with a quote based on data they submit through a front-end form. The quote is calculated according to a price list. The price list varies ...
1
vote
1answer
29 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, ...
1
vote
1answer
28 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 ...
1
vote
3answers
100 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
25 views

Is it possible to pass variables from add_user_page?

If have hooked into admin-menu like this: function adminmenu_users_reserves(){ add_users_page('Reserver', 'Reserver', 'read', 'reserve_list', 'show_userlist'); } add_action( 'admin_menu', ...
1
vote
1answer
128 views

How to add a new plugin page under desired Options page?

Using WordPress Settings API tutorial I created a new custom menu and corresponding sub menus. Each of my menus have a page of its own. I used add_menu_page() and add_submenu_page() for that. (Here is ...
1
vote
1answer
423 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 ...
1
vote
3answers
262 views

place a direct link to custom-stylesheet, under appearance menu in wp-admin

FINAL UPDATE: Updated code from @birgire solved my issue. If you are facing a similar issue, please read the accepted answer. ORIGINAL QUESTION IN DETAIL: Currently under the appearance menu in ...
1
vote
3answers
73 views

How do increase the amount of links shown down the left in the admin menu?

I've inherited a Wordpress site that uses http://podsframework.org/ CMSframework plugin. unfortunately the previous admin created so many pods, which in turn created a lot of custom post types that ...
1
vote
2answers
2k views

How do I fix this error: Warning: invalid argument supplied for foreach()?

I recently moved a wordpress install from my local instance to a dev server. For the move, I installed a clean version of wordpress 3.4, moved exact duplicates of the file structre, and used the ...
1
vote
3answers
883 views

add logout button on admin side menu

I want to add a logout button on the side admin menu (because I disable the admin bar for the users). So I thought add_menu_page() is the way to do it, but how to add the link to the regarded ...
1
vote
1answer
184 views

Remove Admin sidebar link

I have a taxonomy link in my admin sidebar i'd like removed from view. Only in the sidebar though, i will still be using the function in the post view, so if that creates problems a simple simple ...
1
vote
1answer
325 views

Firebug : Problem with jQuery in WordPress admin panel

I'm trying to make my first plugin and I have a problem with firebug. When I use firebug console in WP Admin Panel doesn´t work correctly. For example when I use the selector $('#wpbody') the console ...
1
vote
3answers
716 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 ...
1
vote
1answer
2k views

Current class on admin menu using add_submenu_page()

I am working on creating an administration menu within WordPress for a plugin. I have successfully registered the menu using add_menu_page() and it shows in the sidebar as expected. I have also added ...
1
vote
1answer
155 views

Adding Media Upload to Custom Options Panel breaks “Insert into Post”

I've created a custom site options page as a top-level admin page in my theme. The options are pretty basic but include a couple of images. I initially found a lot of examples for using Media ...
1
vote
3answers
1k 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() { ...
1
vote
1answer
76 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' ); ...