6th Sep '23
/
11 comments

ACF/Meta Box Gallery Images as Bricks Slider in Bricks

Updated on 24 Sep 2024

In the past we showed how to create a custom query for showing ACF Pro's Gallery field or Meta Box' Advanced Images fields' images in Bricks slider element here.

It is possible to achieve the same result in a simpler way using the bricks/posts/query_vars filter. This Pro tutorial shows how.

ACF

Step 1

Create a field group attached to your desired post type having a Gallery-type of custom field.

Step 2

Edit your Pages and populate the field.

Step 3

Edit your post type's singular template with Bricks.

Add a Slider (Nestable) element.

Delete Slides 2 and 3.

Select Slide 1 and enable query loop.

Click the loop icon and set Post type to Media.

Step 4

Enable PHP query editor and paste:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Filtering Bricks Query Loop By Meta Box Relationship

Filtering Bricks Query Loop By Meta Box Relationship

In the Bricks Facebook group a user asks: Consider this setup: CPTs: Service Areas and City Pages Meta Box Relationship: City Pages to Service Areas…
Categories:
Pro
Meta Box Related Project’s Featured Image URL on Single Reviews

Meta Box Related Project’s Featured Image URL on Single Reviews

Updated on 26 Jun 2025 In a recent website I worked on, a requirement was to get the URL of the featured image of a…
Pro
ACF Image Data in Bricks

ACF Image Data in Bricks

Displaying Alt text, Caption, Title and URL of an ACF image field for posts in a query loop.
Categories:
Tags:
Pro
Custom Meta Box Thumbnail Slider in WordPress

Custom Meta Box Thumbnail Slider in WordPress

This Pro tutorial provides the steps to set up an image and YouTube video thumbnail slider in WordPress using Splide and Meta Box. The site…
Categories:
Tags:
Pro
Bricks Dynamic Condition – Check if today falls within 5 days before any holiday date

Bricks Dynamic Condition – Check if today falls within 5 days before any holiday date

Creating a custom condition that returns true or false depending on whether today falls within 5 days before any holiday dates selected on a Meta…
Categories:
Tags: