Add columns to the All Posts, All Pages and custom post types for any taxonomies.
Author: | Marcus Downing (profile at wordpress.org) |
WordPress version required: | 3.0 |
WordPress version tested: | |
Plugin version: | 1.1 |
Added to WordPress repository: | 17-10-2011 |
Last updated: | 26-10-2011
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 1 |
Plugin URI: | http://www.bang-on.net/ |
Total downloads: | 1 421 |
Active installs: | 10+ |
Click to start download
|
This plugin improves the All Posts or All Pages view in the admin section by adding columns for
any taxonomy you wish. There are two ways to use it:
- Use the setting page to select the taxonomies.
- Write code to add a column in exactly the right place.
Screenshots
A Keywords column added to the All Pages listing.
The settings page.
FAQ
Where do these taxonomies come from?
You’ll need to add them, either with code in your theme’s functions.php
or using a plugin.
This plugin does not register or manage taxonomies.
Does this work with custom post types?
Yes.
Can I use this plugin to create custom post types?
No, this plugin does not register or manage custom post types.
You’ll need to add them either with code in your theme’s functions.php
or using a plugin.
My taxonomy/post type isn’t showing up. What’s wrong?
Make sure your taxonomies and post types are public:
register_post_type('foo', array(
...
'public' => true
));
What will this do if I add a column code that isn’t a taxonomy?
Nothing. You’ll get a blank cell.
Can I have more than one taxonomy column?
Yes, as many as you like as long as the column’s ID matches up with the taxonomy ID.
Can I control the order of the columns? How do I add a column in the middle rather than the end?
To fine-tune the order of the columns, you will need to control them yourself.
Turn off the checkboxes in the settings page, and instead use the manage_edit-
xxx_columns
filter which lets you adjust the columns any way you wish.
For example, to add the year
column after the author
column:
add_filter("manage_edit-movie_columns", "add_movie_columns");
function add_movie_columns ($columns) {
$out = array();
foreach ($columns as $key => $value) {
$out[$key] = $value;
if ($key == "author")
$out["year"] = "Year of Release";
}
return $out;
}
Make sure your filter returns a value of some sort, or you’ll end up with no columns at all.
ChangeLog
1.1
Added a settings page and code to add columns for you. No more code required!
1.0
The first release. Required you to add much of the code yourself.