How to set a default meta value for custom field April 21, 2022 by Tarik Billa Why not cover this in your query and use isNull() ? When your meta_key is null for this attachment it is true.