add_post_meta adding extra record in post_meta.
-
Is it as expected that add_post_meta inserts an duplicate post in post_meta table in the database with a post_id of 0?
If Not what could be causing this:
my save_post action calls a function that includes this:
if (!($saved_data == $submitted_data)){ if($saved_data == ''){ add_post_meta($post_id, 'recipe', $submitted_data, true); }else{ update_post_meta($post_id, 'recipe', $submitted_data); } }
update doesn’t seam to do it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add_post_meta adding extra record in post_meta.’ is closed to new replies.