Hi
I'm getting to the goal. Just one more detail:
My meta-key is a group. See the image:
https://cutt.ly/ebny21z
In my code I put the group name in meta_key but meta_value is a json.
How do I specify that the meta_value is "equipamento"?
function equipamentos() {
$args = array(
'post_type' => 'diario-de-obra',
'meta_key' => 'grupo-equipamentos',
'meta_value' => get_queried_object_id(),
'meta_compare' => '=',
);
$query = new WP_Query( $args );
while ( $query->have_posts() ) {
$query->the_post();
echo get_the_title() . '<br>';
}
}