Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Plugin API/Action Reference/manage posts custom column

I wonder if the example on this page is correct. It refers to a "book" custom post type, but the code does not explain what is going on adequately:

It says: Suppose you have a 'books' custom post type and you want the publish date and book author to show up in the browse page.

add_action( 'manage_posts_custom_column' , 'custom_columns', 10, 2 ); ...

Compare this with the example at https://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column

add_filter( 'manage_book_posts_columns', 'set_custom_edit_book_columns' ); add_action( 'manage_book_posts_custom_column' , 'custom_book_column', 10, 2 );

function set_custom_edit_book_columns($columns) ...

So I think if you have a custom post type "books" then you would add_action for "manage_books_custom_column" per the second exampl.

Apologies if this is not the correct place to comment on this!