Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $post_check = new WP_Query( array(
- 'meta_query' => array(
- array(
- 'key' => 'foobar',
- 'value' => 1,
- ),
- ),
- ) );
- if ( $post_check->have_posts() ) {
- echo 'A post exists with foobar=1';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement