Custom post query
Hi,
I need to display posts that belong to not 1 but to 2 categories. I tried editing the Elementor example snippet and pasting it into the Code Snippets plugin but it hasn't worked. Could you guys help me fix whatever I did wrong (I've got no knowledge about this). This was my code:
add_action( 'elementor/query/query-compradores', 'my_query_by_post_types' );
function my_query_by_post_types( $query ) {
$query->set( 'cat', \[ '411' ,'417' \] );
}