Archive

Readers while developing with wordpress i found a problem with the post . I had custom variable into my metabox.

So there is a default hook to be called to save that custom variable into the database.

add_action('save_post','function_save_var');

So by default when u click publish post or update post then ‘function_save_var’ would be called .
So when u update the post and then close the page then this would work perfectly fine but then i din know
auto save would call this hook too .

So when my page would be open for a while all my values would reset and my functionality would fail. So
after a little search i got the solution.