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

learn more… | top users | synonyms (1)

207
votes
108answers
88k 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 ...
34
votes
7answers
13k 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 ...
18
votes
5answers
9k 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 ...
17
votes
1answer
6k 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 ...
16
votes
5answers
6k 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 ...
14
votes
6answers
12k 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 ...
14
votes
2answers
4k 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 ...
12
votes
4answers
8k 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
6answers
6k 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
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
602 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
1k 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
390 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
2k 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
177 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 ...
8
votes
4answers
832 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 ...
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
778 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
6answers
2k views

Disable dragging of meta boxes?

Anyone know how to disable this functionality so the meta boxes can't be repositioned?
7
votes
2answers
275 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
1answer
661 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
383 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
1answer
173 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 ...
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
5answers
5k 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 ...
6
votes
2answers
3k 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 ...
6
votes
1answer
153 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 ...
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
344 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 ...
6
votes
1answer
881 views

How-to make the admin area mobile friendly

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 ...
5
votes
2answers
156 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
1answer
6k 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!
5
votes
2answers
363 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 ...
5
votes
1answer
2k 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, ...
5
votes
3answers
1k 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
5answers
1k 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
248 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
833 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
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
1answer
764 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
4answers
2k views

How to hide admin account in BuddyPress? (for security reasons)

I have been working with WordPress for the past 3-4 years, but I am new to BuddyPress. I would like to hide the admin account completely from BuddyPress for security reasons. For example with a ...
5
votes
3answers
811 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 ...
5
votes
2answers
141 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 ...
5
votes
1answer
800 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 ...
5
votes
2answers
630 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 ...
5
votes
1answer
532 views

Add a new post status in the post progression

I run a site with about 30 authors and 3 editors. Authors submit posts for review, and editors schedule or publish them. It would be useful to have another post status of "Editing" between Pending ...
5
votes
1answer
1k views

Settings API - easiest way of validating checkboxes?

I'm using Settings API and I can't get checkboxes to work, if they're set to "false" they're not even being $_POST and that's the point. Stephen Harris & Chip Bennett explained it, but I believe ...
5
votes
3answers
326 views

Prevent Wordpress from abbreviating-long-slugs…-in-the-admin

On post edit pages, when a slug exceeds a certain number of characters, Wordpress abridges it with an ellipsis (...). For example, if my slug is i-want-to-be-able-to-see-this-slug, it appears on the ...
5
votes
1answer
2k views

Styling Shortcodes in Visual Editor

Does anyone know how to style the visual editor so that when specific shortcodes are used they are replaced with an image within the visual editor? I have found that many users screw up the shortcode ...