dorian06
Member
Posted 1 year ago #
I have a few custom posts types, and with them some custom meta-boxes.
Everything works fine but suddenly the value of the post-type goes blank, I don't really understand whats happening or why, but the fact is that works fine for a couple of minutes and then, goes blank. Im going crazy :S
Have you tried:
- deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).
- resetting the plugins folder by FTP or phpMyAdmin? Sometimes, an apparently inactive plugin can still cause problems.
dorian06
Member
Posted 1 year ago #
I also had this problem, and found that it's a conflict with the wordpress autosave feature, who ignores the content in the meta boxes.
I don't know what your save function looks like, but this is what works for me.
function update_website_url(){
global $post;
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
return $post->ID;
} else {
update_post_meta($post->ID, “website_url”, $_POST["website_url"]);
}
}
I followed the tutorial below to learn about meta boxes, and I ended up with the same problem as you, but in the comments of the post, a guy named John Sparrow has come up with the solution.
Check it out!
http://www.vooshthemes.com/blog/wordpress-tip/create-a-professional-portfolio-using-wordpress-3-0-custom-post-types/