Order posts by meta value hiding posts instead of re-ordering
Literally seconds after updating this post I found the solution….again, Must have looked at this previously and not entered the details correctly as I tried this one before. 🙂 add_action(‘pre_get_posts’, ‘add_special_sort’, 11, 1); function add_special_sort($query){ // Bail if not the main “hidden” query, as opposed to a ‘new WP_Query()’ call if(!$query->is_main_query()) return; $query->set(‘meta_query’, array( ‘relation’ … Read more