How to update and save user metadata on page visits?
There are lots of actions you can hook into to do this, I think the best once to use would be wp or template_redirect. Using either of those actions the code would be like this, this code goes into the functions.php add_action(‘wp’, ‘bt_update_user_homepage_meta’); function bt_update_user_homepage_meta () { // get user id, if user is not … Read more