WPBakery Page Builder (formerly Visual Composer) comes with more than 50 built-in content elements, available out-of-the-box. As Toolset is integrated with these elements, you can easily insert any custom Fields or Views into any of them.
|WPBakery Elements||Toolset dialog for inserting fields|
Custom fields can be used when you create a Content Template, Archive, Product, or even a regular page or post. When designing templates and archives, Toolset allows you to add any fields to any WPBakery Page Builder Element. There are two ways to display post fields:
- Using a Text Block: Simply display the fields you want using Toolset styling. Use this approach if, for example, you want to display a Google Maps field.
- Using any other Element: Use fields as arguments for WPBakery Page Builder Elements.
Let’s use our template for Tours as an example. We’ll create an Accordion and insert a field into it.
- Insert an Accordion Element.
- Your Accordion is inserted. In the Accordion, you need to define the Title of the Section.
- In the Title of the Section,we want to insert the Post Title field (name of the post). We need a Toolset field because we want all posts to render their own title.
- Hover on the Toolset shortcodes drop-down in the Top Bar and click Fields and Views.
- In the dialog that appears, search for “Post Title” and click to insert it.
- The shortcode is generated and is ready to be copy-pasted into the Title Section.
- This is how the Title Section< looks after pasting the shortcode. Thanks to the shortcode, all posts will automatically render their own title.
- Now that we are done with the Title of the Section in the Accordion, we need to specify its content. The content of the Accordion will be the description of each post.
- In the Accordion you just added, create the content section by inserting a Text Block.
- Insert another field to display the description of the Tour. Follow the same steps and insert the shortcode “Post body”.
- See how your template for Tours looks below:
That’s it! Now, when we take a look at the front-end, the design is from the Accordion element but the title and content are generated by Toolset fields for “Post Title” and “Post Body”.
If you need assistance with using Toolset in combination with WPBakery Page Builder, please visit our professional support forum dedicated to this topic.