How to add/update post meta to use in query?
You can use this function, which you’d add to the theme’s functions.php file, to update the average post rating which is saved in a private meta named _avg_rating (but you can of course rename it) — private meta has their name starting with an underscore (_): function update_post_avg_rating( $comment_id, $post_id = 0 ) { if … Read more