WordPress Query where meta field is not set / doesn’t exist

By North Street, A Creative Studio

Sometimes you need to search for a meta field that doesn’t yet exist. If that’s the case, this is the secret:

			'meta_query' => array( 
				'relation' => 'AND',	                	
					'key' => 'resource_type',
					'value' => '', // empty field required!
					'compare' => 'NOT EXISTS' // works!


About north street

We engineer the thoughtful transformation of great organizations. Our proven process helps us understand what your competitors are doing right — and wrong. Want to learn more? Let’s chat.

More Notes

12 Steps to Perfect Your Virtual Onboarding Process

London Biedron Header

Team Spotlight: London Biedron, Client Development Specialist


How to Roll Out a Rebrand