25th Jun '25
/
0 comments

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 project (CPT) that is related to a review (CPT) via a "Post" type of Meta Box custom field for use on single review Bricks template.

Review CPT field group:

"Associated Project" Post type Meta Box field

This can be done by registering a custom function and using it with a dynamic data condition as well as the source of an Image element.

We'll also include the code snippets for getting the associated project's name and permalink URL.

Add the following in child theme's functions.php (w/o the opening PHP tag) 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 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Bricks Forms + Meta Box: Auto-Create Post Relationships on Form Submission

Bricks Forms + Meta Box: Auto-Create Post Relationships on Form Submission

How to link a Bricks post-creation form on a post to a newly created post of another post type using Meta Box relationship.
Pro
Conditional Rendering Based on Current Date and Time in Bricks when Using Meta Box

Conditional Rendering Based on Current Date and Time in Bricks when Using Meta Box

A Pro member of our site asks: Using bricks + Meta, conditionally show a post listing under 3 different conditions, based on the Current Date…
Pro
Dynamically Displaying Connected Content Offer Images in Bricks using Meta Box Relationship

Dynamically Displaying Connected Content Offer Images in Bricks using Meta Box Relationship

Consider the following scenario from a recent project I worked on. CPT 1: project CPT 2: content-offer Taxonomy for Projects: remodel-typeSample term names: Backyard Cottages…
Limiting the Query Loop Posts Output to Post IDs From a Custom Field in Bricks

Limiting the Query Loop Posts Output to Post IDs From a Custom Field in Bricks

A user asks: Recently Bricks introduced the PHP query editor that lets us modify the query parameters right within the query dialog of the builder…
Categories:
Tags:
Pro
Update Post Meta From Another Custom Field’s Value on Post Publish/Update when using Meta Box

Update Post Meta From Another Custom Field’s Value on Post Publish/Update when using Meta Box

In the Meta Box Facebook group a user asks: Hi all, wondering if I can get some help. For custom field 1, I am using…
Categories:
Tags:
Pro
Sort Posts by Meta Box Group Sub Field in Bricks

Sort Posts by Meta Box Group Sub Field in Bricks

This Pro tutorial provides the steps to order posts in Bricks by the value of a Number-type of sub field that is inside a Meta…