I’ve used add_meta_box() to add a custom meta box to the WordPress edit window on both pages and posts.
How can I make this meta box also show on the “Quick Edit” screen?
Ideally, I’d like it to appear just to the right of the Categories selector.
I’ve used add_meta_box() to add a custom meta box to the WordPress edit window on both pages and posts.
How can I make this meta box also show on the “Quick Edit” screen?
Ideally, I’d like it to appear just to the right of the Categories selector.
You must be logged in to post a comment.
There seems to be no easy way to do this, you must add all code yourself.
inline_edit_row()
, the function that draws the Quick Edit and Bulk Edit screens, seems to have only one action that you can hook into:quick_edit_custom_box
orbulk_edit_custom_box
. It gets called for all non-core columns thatwp_manage_posts_columns()
returns. There are some filters you can use to add a column, for examplemanage_posts_columns
. Unfortunately, this function defines the column headers of the post table, so you should remove it again beforeprint_column_headers()
prints them. This can be done in theget_column_headers()
function, with themanage_[screen_id]_headers
filter.edit-post
is the screen id for the Edit Posts screen.All together, this gives a hack like the following to add some code. Finding out where you can handle the form submission is (currently) left as a exercise to the reader.
The above answers don’t provide a definite means to save data. The following code comes out of a production system using the
video
custom post type before I wrote the the WordPress bulk edit plugin Custom Bulk/Quick Edit.File
quick_edit.js
File
video-quick-edit.php