[wp-hackers] Editing the Posts List view for Custom Post Types
Paul Clark
wp-hackers at pdclark.com
Fri Oct 1 04:08:43 UTC 2010
Hi Simon,
I recently did this for a client. You can view the code here:
http://wordpress.pastebin.com/WZyDpqjA
and a screenshot here:
http://pdclark.com/wp-hackers/custom-taxonomy-columns.jpg
In this case, the client was a horse sanctuary. So, the custom post type,
"resident" is horses. Taxonomies were Adoption Status, Breed, Color, etc.
Clicking the taxonomy term names will filter the listing to posts in that
taxonomy.
I based that code off of this example, which uses the same method to display
Post thumbnails in a column:
http://wpengineer.com/1960/display-post-thumbnail-post-page-overview/
I also contracted Kawauso to make a plugin last week that would list any
custom field value in a column for any post type, and allow that value to be
edited via AJAX just clicking on it. He did a really great job. It's
excellent for things like editing All in One SEO Pack values very, very
quickly. It is enabled for different post types and meta fields through a
filter.
I haven't released that plugin outside client sites, but you can download it
here: http://pdclark.com/wp-hackers/meta-columns.zip
And you can see a screenshot here:
http://pdclark.com/wp-hackers/meta-columns-screenshot.jpg
A usage example is included in readme.txt and in meta-columns.php.
Paul Clark
On Thu, Sep 30, 2010 at 3:05 PM, Simon Hamp <simon at flipstorm.co.uk> wrote:
> Hi all,
>
> Does anyone know of an 'easy' way to customise the Posts List
> (wp-admin/edit.php) for custom post types?
>
> I'm thinking adding extra columns, sorting.... that kind of thing. But I
> don't want to change it for all post types, just my custom ones.
>
> A complex example: showing a list of custom taxonomies that have been
> associated with each post in the table view.
>
> Really appreciate any input.
>
> Regards
> Simon
>
> On 2010-09-30 22:56:18 +0100, wp-hackers-bounces at lists.automattic.comWrote:
>
> >Hi all,
> >
> >I have a custom feature in a plugin that can be supported by post
> >types by calling add_post_type_support( 'post_type',
> >'my-super-feature' ).
> >
> >I'd like to get a list of the post types that support
> >'my-super-feature' so I can add a meta box to each of the supported
> >post type screens, but there doesn't seem to be a function that
> >returns all the post types that support a certain feature. I thought
> >we had something like get_supported_post_types('my-super-feature') but
> >I can't find anything like that.
> >
> >Any suggestions?
> >
> >John
> >_______________________________________________
> >wp-hackers mailing list
> >wp-hackers at lists.automattic.com
> >http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list