Users with the ability to perform administrative tasks for a site or a network of sites.

learn more… | top users | synonyms (1)

221
votes
108answers
102k views

Best Collection of Code for your functions.php file [closed]

Please vote on the question and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer. As with many others who are now viewing this post, I have been ...
36
votes
7answers
16k views

Organizing Code in your WordPress Theme's functions.php File?

The more customization I make to WordPress the more I start thinking about if I should be organizing this file or splitting it up. More specifically, if I have a bunch of custom functions which only ...
19
votes
5answers
12k views

Creating a table in the admin-style?

What is the recommended way of creating a page with a table, in the style of the tables showing posts or users in the admin area? I am expanding the Cache Images plugin, and it contains a table with ...
18
votes
1answer
8k views

how to filter post listing (in WP dashboard posts listing) using a custom field (search functionality) ?

despite the fact I googled a lot, I've not found the answer to a very simple question : I have some posts with a custom field (ie supplier_name). I would like to be able to search and filter my posts ...
17
votes
5answers
9k views

What are the standard admin CSS id/class tags?

Is there a list of WordPress CSS id/classes that i can use to build plugin option screens that look and feel more like a normal WordPress option page? i have found some through serendipity but it ...
16
votes
2answers
5k views

Adding an Arbitrary Link to the Admin Menu?

Is there a way to add a arbitrary hyperlink to the WordPress admin menu (I mean the menu on the left when you log into the admin dashboard)? For example, can one add a link to Google? In my ...
15
votes
6answers
15k views

Changing the Order of Admin Menu Sections?

I am getting a bit frustrated over here after having spent a few hours trying to accomplish this fairly simple task without any luck. Essentially I have 5 custom post types which I created and all I ...
13
votes
6answers
7k views

Loading External Scripts in Admin but ONLY for a Specific Post Type?

So I continue to run into this issue and I just looking for the best and simplest solution to solve this problem. I have come to make use of custom post types in many different projects and have ...
12
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?
12
votes
1answer
7k views

Customize Edit Post screen for Custom Post Types?

What's the best way to completely customize the Edit Post admin screen for a specific custom post type? I have customized it to an extent already on creation of the custom post type - adding ...
10
votes
1answer
833 views

WP 3.8 Default Admin Colour For All Users

I am surprised with the new colour scheme for 3.8 and although the classic 3.7 theme has gone, I would like to set the new "Light" colour scheme as the default for all users, but at the same time, ...
10
votes
1answer
2k views

wp_verify_nonce vs check_admin_referer

What is the difference, which one should I use? I know that wp_verify_nonce checks the time limit, and check_admin_referer I think calls wp_verify_nonce as well as checking for an admin url segment, ...
10
votes
1answer
451 views

Find out which moderator approved comment?

Is there any way to find out what moderators have approved a comment, and then display that information on the front-end? e.g. John says: "This is a great article" - Approved by Admin1
10
votes
2answers
3k views

Setting admin edit panels & metaboxes positions and visibility for ALL users and admins

My WP 3.3 setup involves several post types and customized edit panels with Advanced Custom Fields plugin (which creates many metaboxes) and other plugins such as SEO metabox panel, Scribu's ...
9
votes
4answers
190 views

This CSS Stuffing Works, But Is This A Good Practice?

I am trying to include a dynamic css in my plugin, I have been searching anywhere but doesn't find any case that is similar to what I do. And what I use to do it is by adding a css file directly into ...
9
votes
4answers
1k views

Is it possible to create a Wordpress tour? V3.3.1

I've recently upgraded to version 3.3.1 and noticed a nice feature that would be great for our non-Wordpress savvy clients - creating a tour of how to use Wordpress. I've used the Yoast SEO plugin ...
8
votes
6answers
3k views

Disable dragging of meta boxes?

Anyone know how to disable this functionality so the meta boxes can't be repositioned?
8
votes
5answers
6k views

How to use more than 256MB of memory in the admin?

I'm building a site for a photographer who uploads pictures that are normally large for todays digital cameras. Images are quite memory intensive, especially the image operations like creating ...
8
votes
2answers
311 views

Securing Admin Accounts - Username Discovery

We've had Limit Login Attempts installed for some weeks now, and the number of brute force attempts occurring on wp-admin/wp-login is pretty amazing. At first the attempts were all with the username ...
7
votes
4answers
4k views

Showing User's Post Counts by Custom Post Type in the Admin's User List?

I'm trying to figure out how to hook into the /wp-admin/users.php manage page to create custom columns for showing the number of posts users have for the custom post types on WPHonors.com. I created ...
7
votes
6answers
1k views

What are the best practices for updating?

Don't want to do anything to take down my blog. Here are some upgrade-related questions: How often should Wordpress be updated? What is the best way to do it? How to know if there is a problem with ...
7
votes
1answer
9k views

Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

This answer is very close to what I am looking to do, but instead I would like to specify a specific custom field and display a select menu of its available values. Thanks!
7
votes
1answer
1k views

Remove the “View” Link in Post Admin

I have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the "view" link appears in the admin column. Is there a ...
7
votes
3answers
398 views

How can I target WordPress 3.8 new interface MP6 with CSS?

When MP6 was a plugin in WordPress 3.6+ it changes the body class of the admin and added an "admin-mp6" class which helps me to style my plugin accordingly. Now with the latest Alpha of WordPress 3.8 ...
7
votes
2answers
4k views

Any guides on creating custom admin pages?

I basically want to create a table (preferably AJAXified) that lets the user enter a line of information, and be able to add new lines of information, and delete selected ones. I've found this post ...
7
votes
1answer
193 views

Notification that the admin is online

How can I say to all visitors that the admin is online. I mean if the admin is online all the visitors, registered and none registered, will see this words "hello the admin is online...talk with ...
7
votes
1answer
179 views

How do I optimize a custom post type admin page with 25,000 posts?

I'm getting the occasional excessive resource limit error to due to loading so many posts at once. We had set the PHP limit to 128 but just loading the list of posts for a couple of the post types is ...
7
votes
1answer
1k views

How-to make the admin area mobile friendly [closed]

Currently the admin-UI is a no-go for mobile browsers. Therefore I'm searching for a plugin that makes the back-end/admin-UI accessible and a little more friendly for mobile devices. Features, the ...
6
votes
2answers
5k views

Load a script just to custom post type in admin

I have created a custom post type "portfolio" with something like this : $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => ...
6
votes
3answers
1k views

Set Default Listing “View” in Admin

I'm looking for a way to set the default "View" options under post types in the admin area. For example, by default Posts will default to a "list" view instead of "excerpt" - I'd like to change this ...
6
votes
1answer
3k views

How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?

This seems like simple thing but I need way to determine whether the current screen is for Add New or Edit ( a sort of wordpress admin conditional tag). Is there a built in function for this already, ...
6
votes
1answer
675 views

Disable Media Uploads to non Admin Users

I am working on a clients site, one of the features they want is for his Editors or Authors to only be able to select existing images to insert into Posts from the Media Library. So looking at the ...
6
votes
3answers
1k views

Editor Styles and Typekit

My website uses typekit to grab custom fonts, which works on the frontend. I'd like to put this in my editor styles in the backend. However, I don't know how I would do this. Typekit uses a js embed ...
6
votes
1answer
1k views

Change admin language based on user (in single-site)

I'm trying to make a small plugin to install in some sites of a german client. I can make my way around WordPress in german, but would be easier if it was in english. There's a plugin that manages ...
6
votes
2answers
1k views

admin page redirect

Is it possible to redirect users to an admin page if they access another admin page? For example if they a user ever hits "all pages" /wp-admin/edit.php?post_type=page they would get redirected to ...
6
votes
2answers
3k views

Sort admin menu items

On a related note to "Changing the Order of Admin Menu Sections?", I'm looking for a way to alphabetically sort the entries in each sub-section of WordPress's admin area. Currently, whenever a new ...
6
votes
2answers
380 views

sort child pages on admin

I have a hierarchical CPT with the following structure: - parent item 1 - child item 1 - child item 2 - child item 3 - child item 4 - child item 5 - parent item 2 - child item 1 ...
5
votes
2answers
161 views

What is the best way to customise admin files so they survive future upgrades?

I have a site with some custom post types, one of which doesn't have a title. When viewed in the admin section, the posts are listed like so Which is less than ideal, for obvious reasons. I have ...
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
3answers
2k views

Change admin bar to default:off

While I quite like the admin bar I actually want it to be OFF by default instead of ON ( I don't want to disable it altogether because I want users to be able to turn it on if they want - but but I ...
5
votes
2answers
6k views

How do I load a CSS style into WordPress admin area only?

I'm trying to load a CSS file for my WordPress post area, but having no luck. I have read over the wp_enqueue_style function and came up with the code below, but it doesn't load up. Is there a tag or ...
5
votes
2answers
4k views

3.3: How do you hide the new dashboard welcome panel?

I have tried various versions of this here: unset($wp_meta_boxes['dashboard']['normal']['high']['dashboard_wp_welcome_panel']); ...
5
votes
5answers
2k views

How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?

I'm working on a site that requires an https secured admin area and a secure front-end area as well where private information will be shown. My preference for user login is an Ajax-enabled widget that ...
5
votes
2answers
381 views

Can I force a metabox to be in one column?

Suppose I created a custom metabox for the add/edit post page that uses a wide width (not suitable for being in the sidebar), is there a way of keeping it in the middle column only and sortable while ...
5
votes
5answers
1k 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
1answer
910 views

Filter post listing by meta value which is a date

This question is almost what Im trying to achieve. Create a filter for posts based on a custom field. My custom field is a date and I would like to create a date filter (monthly) based on this custom ...
5
votes
1answer
928 views

Search posts by ID in admin

I'm looking for a way to search through posts by ID, preferably with support for custom post types. I was hoping there'd be a plugin enabling this functionality, but I've failed to find anything. Any ...
5
votes
1answer
3k views

How to set back-end language per user?

I would like to use the english interface for the back-end but I would like to set it to native language for an editor. I know WPML has this feature, but I don't want to install the unsupported WPML ...
5
votes
2answers
168 views

Prevent widgets removal

I'm building a site with a lot of widgets. They have been highly customized. Several admins/editors will have to edit these widgets when the site is live. Right now I'm scared to see a widget (and ...