send meta box input data without publish button

You can get the post id like this var post_id = $(‘input[name=”post_ID”]’).val(); See this full working code. BTW its only save the value to the meta in the ajax it won’t save it on the publish button you need to add another hook with another function. you can’t use the same function that you used … Read more

Input select option Change Content in Metabox

This is totally wrong. Metaboxes are shown on post/page editing screen, so if you submit your own form, the whole page will be submitted/refreshed. Look up what a metabox is here => SO Thread You should use WP’s own functions to deal with this. Look add_meta_box() and check this tutorial to know how you should … Read more

CSS styling not working in a custom metabox

The metabox div gets an ID of ‘meta_’ + your metabox ID, thus: Sorry, that was me looking at my own metaboxes, forgetting that I actually prefix them like that to differentiate the container from elements within the container 🙁 Let’s work through your code and see if we can find the answer. First, your … Read more