Well I figured it out but I had to add
remove_all_filters('posts_orderby'); before the $args and had to change
DESC because remove filters reversed the order. Something odd is happening but if someone has an explaination as to why this works please let me know.
remove_all_filters('posts_orderby'); $args = array ( 'post_type' => 'exhibitions', 'meta_query'=> array( 'relation' => 'AND', array( 'key' => 'exhibition_status', 'value' => 'current', ), array( 'key' => 'end_date', 'compare' => 'EXISTS', ), ), 'meta_key' => 'end_date', 'orderby' => 'meta_value', 'order' => 'DESC', 'post_status' => 'publish', 'posts_per_page' => 10, 'paged' => get_query_var( 'paged' ), );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.