Update post meta function is deleting post meta data.
-
I am trying to update a custom meta variable using the update_post_meta function. I have the following code written.
update_post_meta(1054, 'freeimage_filename', $freebackgrounds->background[$i]->imagefilename);
Everytime I run this, the data is deleted and the page no longer shows the variable.
I have checked that the variable has a value and echo it in the line prior and it has a valid string.
Any ideas why the new value is not replacing the existing value and why the existing value is deleted?
Thanks,
christopher
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Update post meta function is deleting post meta data.’ is closed to new replies.