Monthly Archives: January 2015

WordPress – Get all posts where a meta key does not exist

Simple… $search_values[‘meta_query’] = array( ‘relation’ => ‘OR’, array( ‘key’ => ‘psychedelics’, //replace with the non existing field to query ‘compare’ => ‘NOT EXISTS’, ‘value’ => ” // Ignored, but needed to work… ), array( ‘key’ => ‘psychedelics’, //replace with the … Continue reading

Posted in Learned Today, Medium Technical, Wordpress | Tagged , , , , , | Comments Off