Categories
CMS Development Wordpress

How to query post with meta?

Hi newbie question just create Rest endpoint for query-specific post type
is work fine but did not get data from wp_postmeta
how to query related data or using other WP_ ?

try meta_query but how to add post_id for query relation

$all_pms =  new WP_Query( [
 'post_type' => 
     'pms-subscription',
     'post_status'=>'active', 
     'meta_query'=>[
          'pms_subscription_plan_price' => 126 <-- assume it relation but not work
     ]
  ] 
  );

thank

Leave a Reply

Your email address will not be published. Required fields are marked *