/ Database / query.update_post_meta

Title : query.update_post_meta
Purpose : Updates a post meta field based on the given post ID.
Syntax :
Input Parameters : post_id, meta_key, meta_value, prev_value
Return Value : Meta ID if the key didn’t exist, true on successful update, false on failure or if the value passed to the function is the same as the one that is already in the database.
Example 1 :
Code :
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *