Dynamically populate query source in Elementor post widget


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: the

Can you help me? Thank you

Stuart66 8 months 2020-12-04T07:25:52-05:00 0 Answers 9 views 0

Leave an answer