Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get post by meta value

$args = array(
   'meta_key' => 'custom-meta-key',
   'meta_query' => array(
       array(
           'key' => 'cp_annonceur',
           'value' => 'professionnel',
           'compare' => '=',
       )
   )
);
$query = new WP_Query($args);
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #post #meta
ADD COMMENT
Topic
Name
2+3 =