Home › Forums › ACF PRO › Possible to get all custom field values? › Reply To: Possible to get all custom field values?
$unique_non_blank_values = $wpdb->get_results( "SELECT DISTINCT meta_value FROM ".$wpdb->postmeta." WHERE meta_key = 'YourMetaKey' AND meta_value <>'' ORDER BY meta_value DESC");
maybe this way?
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.