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

HappyFiles Gallery from Selected Categories using Meta Box

Sridhar Katakam

This members-only tutorial provides the steps to use Meta Box 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 using Meta Box' Taxonomy Advanced field:

Post when viewed on the front end:

Images in the selected categories will appear

Clicking on an image in the gallery will open it in a lightbox with previous/next navigation, close button, optional thumbnail navigation within the lightbox etc.

Step 1

Installed and activate Meta Box and Meta Box AIO.

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

Go to Meta Box > Custom Fields and create a new field group having Advanced Taxonomy type of field having a label of say, "HappyFiles Category".

In the Settings tab, select the post type you want the group to be attached to. Let's say post post type in this example.

Step 2

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

Add a Code Block component where you want to display the images from the selected category/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