This Pro tutorial provides the steps to use ACF to select one or more HappyFiles' folders and output the images from the selected folder(s) using HappyFiles shortcode or Bricks' Image Gallery element or img elements in a query loop.
This is the equivalent of Post-specific HappyFiles Galleries using a Meta Box Select Field in Bricks tutorial but for ACF instead of Meta Box.
Step 1
Install and activate HappyFiles.
Go to Media → Library.
Create folders and categorize images by moving them into the folders.

Step 2
Install and activate ACF.
Go to ACF → Field Groups.
Create a new field group for your post type having a Select-type field.

Leave the Choices empty. We shall populate it programmatically in the next step.
If you would like to be able to select multiple folders, enable the "Select Multiple" option.
If you would like - Select - to appear as the 1st option for this field in the post editor screens, enable Allow Null in the Validation tab.
Step 3
Let's define a custom function to populate all HappyFiles folder names as options of above Select field.
Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin:
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account
