Menu Close

The Dynamic Field element

Blocksify Pro Dynamic Field adds a custom-field value to each Content Loop card.

Before you start

Select a Content Loop for a post type with saved custom fields. Its field plugin must be active, with fields assigned to that post type.

This tutorial uses Properties and its Meta Box fields Price, Bedrooms, Bathrooms, Floor Area, Listing Agent, and Virtual Tour. Add values to several published properties.

Open the card builder and add a Dynamic Field

  1. Select Content Loop and open General → Card.
  2. Under Card Elements, select Add element.
  3. Choose Dynamic Field, select a card position, and select Add Element. The Dynamic Field card item appears in that position.
The Add element panel shows Dynamic Field selected above the Media Overlay, Card Header, Card Body, and Card Footer positions.

Pick the field

  1. Select Content Loop, open General → Card, then select the new Dynamic Field and open Field. Fields are grouped by plugin or field group.
  2. In the Field menu, find the Meta Box group and choose Price. Number controls appear.
  3. The editor card preview shows the price saved on a recent published property; date fields offer a date format, image fields offer an image size, and a single Listing Agent relationship can reveal supported Listing Agent fields.
The Dynamic Field menu lists the Meta Box fields Price, Bedrooms, Bathrooms, Floor Area (sqm), Available From, Featured Listing, Photo Gallery, Listing Agent, and Virtual Tour.

Set fallback text and display options

  1. Select Content Loop, open General → Card, and open the Price Dynamic Field. Set Prefix, Suffix, Decimals, and Fallback text (“Price on request”).
  2. In another Dynamic Field, select Bedrooms and set Decimals to 0. Date fields offer a WordPress date format, an empty Price with a $ prefix shows $Price on request, yes/no fields add label controls, and images offer Image size.
The complete Dynamic Field data popover shows ns_price as a Number with a dollar-sign prefix, zero decimals, Price on request fallback text and no link.
  1. Select Content Loop, open General → Card, and open the Price Dynamic Field. Scroll to Link to, then choose This item for the property.
  2. Alternatively, choose Related object and select Listing Agent under Relationship. A field accepts a supported clickable URL field; Custom URL accepts a fixed address. The price links to that destination; choose None to remove it, or use the separate Link card item for its own text link.
The Dynamic Field link controls show Related object selected for Link to and Listing Agent selected for Relationship.

Publish and check the storefront

  1. Select Content Loop, open General → Card, and confirm the Dynamic Field settings. Select Save or Publish, then compare several Properties cards on the published page.
  2. Confirm each card’s price, bed, bath and area details, and link destination. Every published card should use the same settings and its property’s saved value.
The published Property Cards grid shows three listings with formatted prices, bed, bath and area details, agent names and footer actions.

Was this helpful?

0

Updated