30th Apr '23
/
5 comments

Dynamic HappyFiles Gallery in Bricks with Meta Box or ACF Pro

Updated on 12 Jul 2023

This Pro tutorial provides the steps to show the images uploaded to an "Image Advanced" type of custom field created using Meta Box or "Gallery" type of custom field created using ACF Pro as a gallery using HappyFiles Pro in Bricks.

While Bricks does have an Image Gallery element, it does not have all the features possible in HappyFiles gallery, like showing image caption and thumbnail navigation in the lightbox.

Field group (screenshot when using Meta Box, with ACF the field type would be Gallery instead):

Field populated for the Page:

Page on the front end:

Meta Box

Step 1

Create a field group for your post type having an "Image Advanced" type of custom field with an ID of page_gallery.

Step 2

Edit your Pages and populate the custom field by selecting/uploading images from/to the media gallery.

Step 3

Define a custom function that is going to be used in the next step.

Add the following in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 632 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Button to Open Bricks Gallery

Button to Open Bricks Gallery

How to trigger a click on the first image of a gallery in Bricks when a button is clicked.
Categories:
Pro
HappyFiles Folder Images via Meta Box Taxonomy Field in Bricks Image Gallery

HappyFiles Folder Images via Meta Box Taxonomy Field in Bricks Image Gallery

How to set the source of Bricks’ Image Gallery element on a post to images in the selected HappyFiles Folder(s) via a Meta Box Taxonomy…
How to create filters with IsotopeJS in Bricks (Part 2): Dynamic Image Galleries

How to create filters with IsotopeJS in Bricks (Part 2): Dynamic Image Galleries

This tutorial series will review how to create a dynamic filterable image gallery using the IsotopeJS library‘s features in Bricks. Requirements Create a custom taxonomy for your…
Pro
Displaying Gallery of SureCart Product Images with Bricks’ Query Loop

Displaying Gallery of SureCart Product Images with Bricks’ Query Loop

Custom query loop for looping through SureCart product images.
Categories:
Tags:
Pro
Media Library PDF Attachments Listing in Bricks

Media Library PDF Attachments Listing in Bricks

Updated on 9 Sep 2024 This Pro tutorial provides the steps for displaying PDF files from a HappyFiles folder as a list/grid using a Bricks…
Pro
ACPT Gallery Field Query Loop in Bricks

ACPT Gallery Field Query Loop in Bricks

How we can output images from ACPT‘s Gallery field for posts as a grid using a query loop.
Categories: