Tag Info

New answers tagged

0

The trouble is that save_post fires in lots of places other than the "edit post" screen - when it does, your code will think the checkbox is unchecked and overwrite your saved state. Add an additional hidden input to your meta box: <?php // Don't global post, use the $post parameter already passed to the function // global $post; // Avoid undefined ...


0

Figured it out. I had to re-read the codex a lot to figure out that when you pass an array to update_post_meta it is serialized. By using maybe_unserialize() on the return value I was able to to get access to the values. Hope this helps some future searcher!



Top 50 recent answers are included