Получите все пост -мета
//Get the meta for all keys:
<?php $meta = get_post_meta($post_id); ?>
Andrew Lautenbach
//Get the meta for all keys:
<?php $meta = get_post_meta($post_id); ?>
get_post_meta( int $post_id, string $key = '', bool $single = false )
$args = array(
'meta_key' => 'custom-meta-key',
'meta_query' => array(
array(
'key' => 'cp_annonceur',
'value' => 'professionnel',
'compare' => '=',
)
)
);
$query = new WP_Query($args);