A team section with every name, role, and schedule typed into the design is hard to keep up to date. Every schedule change means editing the layout, and every new team member means building another card. Here you’ll store each dentist as their own post with ACPT, then connect one card design to that data with Mosaic’s ACPT integration, so the whole grid updates itself.
Set up the data
This tutorial starts from data that’s already set up in ACPT, so you can see what each card pulls from.
A post type called Team Member is registered in ACPT, so every dentist is their own post.
A field group for the post type holds the details each card needs, like the role, years of experience, languages, whether they accept new patients, office days, and specialties. These are stored as data instead of being typed into the layout.
The post title holds the dentist’s name, the content holds a short bio, and the featured image is their photo. These are standard WordPress fields, so there’s nothing extra to set up.
Specialties is a repeater field, so each specialty is its own row, and every dentist can have as many as they need.
Add the loop
Start from the static team grid you already designed, so you don’t have to rebuild the card.
Copy one of the team cards, then delete the entire grid.
From the Add panel, drop in a Loop element and select the filtered post type, filtered team members. Insert the loop, and the team members show up.
Delete the pagination, the link, and the image, so only an empty item element is left.
Paste the card design you copied earlier into the empty item.
The original design was part of a grid, so select the Items container and, on the Style panel, change Display from Flex to Grid. Add 4 columns to show four cards in each row.
Connect the post fields
At this point, every card shows the same person. Start with the fields that come from the post itself.
Select the image and click the dynamic data icon on the toolbar to open the dynamic data panel. Insert the featured image variable, and each card now shows the right photo.
The dentist added last shows up first. Select the Loop, then on the Settings tab add an order by record. Choose the publish date, which is a post variable, and set the key to Published date GMT. The oldest post now comes first.
Select the name, open the dynamic data panel, and insert the title variable, since the name is stored as the post title.
The bio is stored as the post content, so use the content variable. The content comes through as HTML, so before inserting it, apply the Remove HTML option from Mosaic’s dynamic functions. Now only the text shows.
Connect the ACPT fields
ACPT fields work the same way as the post fields. You pick them from the same dynamic data panel.
Select the role and insert the ACPT Team Member Role variable.
Experience is stored as a number, so copy the existing text first, then open the dynamic data panel. Paste the text into the dynamic code, highlight the static number, and select the ACPT Team Member Experience variable. The value is now inserted into the sentence.
Insert the Team Member Languages variable. This is a loop variable, meaning it holds multiple entries, so choose the value and all items. Each dentist now shows every language they speak.
Show or hide with rules
Conditional visibility lets you show an element only when a field has a certain value.
Select the badge and add a conditional visibility rule. For the rule base, select Variable, then pick the ACPT Team Member Available variable and select its value.
The value is whatever you set it to in ACPT, or empty. In this example, it’s “Yes”, so set the operator to equals and the value to check for to Yes, then apply.
The value is whatever you set it to in ACPT, or empty. In this example, it’s “Yes”, so set the operator to equals and the value to check for to Yes, then apply.
Conditional visibility rules only run on the frontend, so nothing changes in the editor. Open a preview to see the badge on the dentists who accept new patients, and not on the others.
Each weekday has two buttons, one styled for in-office and one for out-of-office. Unhide all of them so you can see what you’re working with.
Select the in-office Monday button and add a conditional visibility rule. Choose the ACPT Team Member Office Days variable, which is also a loop variable, and select the value from all items. You get a comma-separated list, just like the languages. Set the operator to contains, and enter the value of the Monday option from ACPT, “mon” in this example.
Select the out-of-office Monday button and add the same rule, with the Team Member Office Days variable and the value from all items. Set the operator to does not contain, with the same value.
Set up the rest of the buttons the same way, then preview. Every dentist now shows their own office days.
Loop the specialties
Specialties are a repeater, so they need a loop of their own inside each card.
Copy a specialty from the list so you keep its design, then remove all items from the list.
On the toolbar, add a Loop items element. Delete its default item and paste in the one you copied.
Go to the Settings tab and change the type to ACPT Team Member Specialties.
Replace the static text with the Team Member Specialty variable, which holds the value of the field in the repeater. Every dentist now lists their own specialties.
Result
Your team section now runs on real data. Photos, names, bios, roles, experience, languages, the new patients badge, office days, and specialties all come from ACPT, so a schedule change or a new team member only takes an edit to their post, not to the layout.