This Pro tutorial provides the steps to set up a dynamic testimonial slider in Bricks that pulls the data from a Custom Post Type's post fields and custom fields.
Main text → CPT item post content
Image → CPT item featured image
Name → CPT item post title
Position → CPT item's
testifier_position custom field value
Star rating → based on CPT item's
rating custom field value. If 5 is selected in the select field's dropdown, 5 stars will be output. If 4 is selected, 4 stars will be output and so on..
testimonial CPT using a plugin like CPT UI.
Install and activate ACF.
If you would like to import the field group from our demo site, here's the json file.
Create a new field group.
Add a new field of type Text whose Field Name is
Add another field of type Select whose Field Name is
Set the Choices to:
1 2 3 4 5
Set the Default Value to
Under Location, associate the field group with your Testimonial CPT.
Enter/set the title, content, position, rating and featured image for each.
Let us define a custom function that returns the HTML for stars output based on the passed-in rating argument.
In your child theme's
functions.php or a snippets plugin like WPCodeBox, add:
This is a Pro members-only tutorial.
To get full access, login below or sign up for a Pro Account