12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Nov 27, 2020

HappyFiles Gallery from Selected Categories using ACF

Sridhar Katakam

This members-only tutorial provides the steps to use Advanced Custom Fields to set up a HappyFiles category selector so that images from the selected categories will be shown as a gallery on Pages or Posts etc.

Categories in Media Libary:

Selecting one or more categories when editing a Post:

Post when viewed on the front end:

Images in the selected categories will appear

Step 1

Installed and activate ACF and HappyFiles.

Go to Media > Library, create your desired categories and drag images into them.

Go to Custom Fields > Add New and create a new field group having happyfiles_category Taxonomy type of field.

Ensure that the return value is set to Term ID.

Set it to appear at your desired location.

Step 2

Edit the Oxygen Template that applies to your post type, in this example, to all the posts.

Add a Code Block component where you want to display the images from the selected categories for each post.

Set Width to 100%.

PHP & HTML:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right