Count of Images in Meta Box Image Advanced Field

In the BricksLabs Facebook group a user asks:

Is there a way to count images inside a post that uses metabox image upload ?

This Pro tutorial provides the code for getting the count of the number of images in an Image Advanced type of custom field created using Meta Box.

We are going to define a custom function and can then use it with the Dynamic data tag in Bricks to, for example, conditionally render a Section only if there is at least one image uploaded/selected to/for the field.

with the Dynamic data being


where image_advanced_vsoh9ful7jb is the field ID.

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get full access to all 220+ Bricks tutorials with BricksLabs Pro

Leave the first comment