add_action ‘manage_posts_custom_column’ in a class [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years … Read more

Custom column for changing post status via ajax

I’m currently trying to implent a new custom column at the page manage screen that will let me change the status (published/pending) of the different pages via an easy toggle link. From what I’ve gathered I need to use $post->post_status, ‘status‘in someway, probably toggle with jQuery or something. But I can’t figure out how I … Read more

Adding Category/Tag/Taxonomy Support to Images/Media

I’ve been trying to add category, tag, or custom taxonomy support to images (or all media, though I’m only concerned with Images). I’ve got it part-way figured out with: add_action(‘init’, ‘create_image_taxonomies’); function create_image_taxonomies() { $labels = array( ‘name’ => ‘Media Category’ ); $args = array( ‘labels’ => $labels, ‘public’ => true ); register_taxonomy(‘imagetype’, ‘attachment’, $args); … Read more

Make custom column sortable

I have a added custom column to a custom post type, and it works fine. I just want it to sort the names by title, so I tried this, function sortable_custom_columns( $columns ) { $columns[‘custom_column’] = ‘title’; return $columns; } add_filter( ‘manage_edit-custom_sortable_columns’, ‘sortable_custom_columns’ ); However, that is returning very random sorting. I think it may … Read more

Replacing the title in admin list table

Here is my situation: I am trying to filter the content of the title column in my custom post type edit table but I can’t get it working. Here is what I have tried: add_filter(‘manage_edit-mycpt_columns’, ‘replace_title_products’); function replace_title_products() { $oldtitle = get_the_title(); $newtitle = str_replace(array(“<span class=”sub-title”>”, “</span>”), array(“”, “”),$oldtitle); $title = esc_attr($newtitle); return $title; } … Read more

Custom columns for taxonomy list table

I have the following code to add a new column to my taxonomy edit screen (edit-tags.php?taxonomy=book_place&post_type=books) function add_book_place_columns( $columns ) { $columns[‘foo’] = ‘Foo’; return $columns; } add_filter( ‘manage_edit-book_place_columns’, ‘add_book_place_columns’ ); function add_book_place_column_content( $content ) { content=”test”; return $content; } add_filter( ‘manage_book_place_custom_column’, ‘add_book_place_column_content’ ); It’s working, but I need to access the current term id … Read more

How do I set the default admin sort order for a custom post type to a custom column?

SOLUTION AVAILABLE HERE I’ve set up a custom post type called clientarea, and set up several custom columns for it in the admin area – the custom columns are all custom meta fields, as you can see from my code. I’d like to sort by ‘Appointment Date’ descending by default. All of the columns work … Read more

Style custom columns in admin panels (especially to adjust column cell widths)

I am using WordPress as a CMS for a project which makes extensive use of custom post types. I need to display columns in admin panels for each custom post type in a different way. I’ve already created the necessary columns and populated them. What I need to do is to adjust the CSS a … Read more