Recently I wanted to use WP All Export to generate a list of posts that had an empty value in one of my custom fields. To do this I had to use the WP_Query function in WP All Export. Below is the snippet that worked for me:

'post_type' => 'product',
  // Enter the Post Type Here
'taxonomy' => 'taxonomy_name', // Enter Tax here
'terms' => 'terms', // If you have terms enter it here
'meta_key' => 'meta_key_name',
  // Enter the Custom field name here
'meta_value' => ' ',
  // Enter the value of the custom field here. If you want empty fields just make sure it is a space
'meta_compare' => '=' // This tells us to find values equal to the value we just added

Leave a Reply

Get in Touch

Please fill out the form below and we will get back to you ASAP

  • This field is for validation purposes and should be left unchanged.