How can I update post meta inside the WP_Query? Does this mean inside the loop? Sorry, I'm not too technical about this.
This is the code I'm using:
<?php
if(isset($_POST['jolly'])){
update_post_meta($post->ID , 'carry', 3);
}
?>
<form action='' method='POST'>
<input type='submit' name='jolly' value='test' />
</form>
Are there alternative ways?