I need to find out the post_id of a post_meta record where the custom key is 'XYZ' and the is 'ABC'? Is there an API for that?
Or do I need to run a regular select SQL with wpdb class?
Does something like this work?
if (have_posts()) :
while (have_posts()) : the_post();
$post_id = get_the_ID() ;
SELECT post_id FROM wp_postmeta where
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
2 years ago