As the documentation says,
I’m trying to display a slider that has the category 2, that is what I tried but it doesn’t work :
$post_id = "category_2";
$images = get_field('gallery', $post_id);
if( $images ): ?>
how could I do?
The only thing that can be wrong here is the category ID or the taxonomy name “category”. Or that there are is no gallery field or images save for the category.