I have created form for enquiry. When user fill this form then I am saving it into database as a custom post type. In backend I need to show extra information on custom post edit page. But did not find any hook.
I have tried this code:
[![function add_extra_info_column( $columns ) {
return array_merge( $columns,
array( 'sticky' => __( 'Extra Info', 'your_text_domain' ) ) );
}
add_filter( 'manage_posts_columns' , 'add_extra_info_column' );][1]][1]
But it adds a new column in custom post.
I need to show extra info when we click on edit page link for every post.
This is just an example and you have to customize it for your needs:
First step: Adding Meta container hook to backend (for example here for products post type):
(replace
'product'
by your post type and this meta box could be like here on'side'
or by ‘normal’ to get it on main column)Second step: Adding information in this metabox (fields, data, whatever…)
References:
function add_meta_box()
How to add custom fields for WooCommerce order page (admin)?
How to add option to woo commerce edit order page?
Third step (optional): Save the data of the custom meta post (needed if you have some fields).