The Kadence team has done it again. They released an update to the Pro version of Kadence Blocks. The newest version adds a Dynamic HTML Block and support for pulling dynamic content using a post relationship. In this video we take a look at these two new features.
Test Site Setup
On my Kadence test site I have a Custom Post Type books that I used in a previous video. I also created a new Custom Post Type called Bookstores.
If we look at the ACF field groups there is one for each post type.
The Bookstore Custom Post Type has one custom field, which is a URL field link to the bookstore.
The Books field group has two new fields. In addition to the Author’s Website and Author’s Photo, which were used in a previous video, there is now an Available field and a Custom Excerpt field. The Available field is a relationship field between Books and Bookstores. The Custom Excerpt field is an ACF WYSIWYG field.
Here is the definition of the Available field. It is a Post Object field, which is one of the ACF types of relationship field, and it is set to return the Post ID.
In the editor for a Book record I have values for these two new fields. In the Available relationship field there is a dropdown and you can pick the bookstore that has this book in stock. In the Custom Excerpt field I’ve added content where the book title is in italics, there is a link to the genre archives and there is a rating with stars.
As you may know, WordPress strips out HTML and special formatting from excepts. So in the Kadence theme builder for the book archive I’ve removed the Excerpt field and added the new Dynamic HTML block. In the block settings I click on the database icon to access the dynamic fields options. I select a Custom Field from the Current Post and then the Custom Excerpt field.
Here is the Custom Excerpt in the archive on the front.
I’m happy to see that the Kadence team is actively adding new features to the Kadence theme and Kadence Blocks. Kadence is one of the most powerful and easy to use block collections and it has good support for dynamic data.