I want to call dyanamically categories in the post widget of Elementor. I created a function to call results from a field created with ACF (a dropbox select of posts categories):
add_action( 'elementor/query/acf_filter', function( $query ) {
$value = the_field( "category_filters" );
}, 10, 1);
That query doesn't work. All the categories are rendered instead of selected ones. Above, there is the field rendered with categories ID, see the photo:
Can you help me? Thank you