How to Check if Meta Value Exist in WordPress Query

On a loop that performs data from custom meta field, to check if the meta key has value or exist, we can use the following query:

The above code can be used in WordPress older than 3.5 but it still usable in the latest version of WP, currently 5.1.

snippet, Wordpress

Any idea? Fill the comment below

This site uses Akismet to reduce spam. Learn how your comment data is processed.