Use a function to update post meta based on other post meta
Here are two simple ways to do this: One is to use the the_content-filter to update the post “hotness”, or you can schedule an event that will run daily and update the “hotness” once a day. First approach: the_content-filter Turn you code in to a “callable” function: function update_hotness( $post_id, $echo = false ) { … Read more