Post meta in Custom post type, deleted by quick edit…
-
I have a custom post type for which I use a few custom fields to save additional data. Everything works perfectly until I save my post in the Quick Edit editor. Then all custom meta data is deleted? any ideas?
The only difference in my code I see with the Codex example is that I don’t return the saved data at the end of the saving function… is that necessary? What does it do?
I would not know what to return as I update multiple keys with multiple calls to update_post_meta…function save_options(){ global $post; if ( !wp_verify_nonce( $_POST['myNonceName'], 'myThemeName' )) { return $post_id; } if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { return $post_id; } update_post_meta($post->ID, "textsubtitle", $_POST["textsubtitle"]); update_post_meta($post->ID, "textauthor", $_POST["textauthor"]); update_post_meta($post->ID, "textshowchildren", $_POST["textshowchildren"]); update_post_meta($post->ID, "textforceprocess", $_POST["textforceprocess"]); update_post_meta($post->ID, "textclearformat", $_POST["textclearformat"]); update_post_meta($post->ID, "subtext", $_POST["subtext"]); }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Post meta in Custom post type, deleted by quick edit…’ is closed to new replies.