Toolset allows you to create lists of content and display them anywhere in your site. This may be lists of regular posts, pages, or custom posts (like Tours or News). In Toolset this is called a View and is one of the most popular Toolset features.
Toolset allows you to use WPBakery Page Builder (formerly Visual Composer) to design how single entries are displayed in your custom list of content. In our example, we create a list of tours, where “Tour” is our custom post type.
- Go to Toolset -> Dashboard.
- Locate the custom post type for which you want to create the View (“Tours”, in our example) and click the Create View button.
- Give your View a name such as “List of Tours”. Select Display all results, and click Create View.
- You are taken to the View editing page.
- Scroll down to the Loop Output Editor section and click on the Loop Wizard button.
- In the Loop Wizard that appears, select Unformatted, and click Next.
- As we will insert all the fields using the WPBakery Page Builder, click to add only one field. For example, select the Post Title.
- Select the Use a Content Template to group the fields in this loop option and click Finish.
- Stay on the View page as we are not done yet.
- Click the Scroll down to the Content Template button.
You are taken to the Template for this View section. Use the WPBakery Page Builder to design how a single entry of your View is displayed.
Now that we have created a list of Tours, we need to design how single post entries are displayed in our list. We will use the WPBakery Page Builder to control the content of a single Tour post, and the expected result is shown below.
- Click the WPBakery Page Builder button.
- Click the Edit WPBakery Page Builder button.
- Now you can see the familiar WPBakery Page Builder interface—use it to design a single post entry.
- Now we are going to insert the post fields (title, featured image) into some Text Blocks and some other custom fields (tour price, tour duration) into a Tab Element. To insert a field, follow the steps below:
a. In our example, we insert a Text Block:
To insert fields into any other types of Elements (like a Tab for example), please refer to our page about inserting fields into Elements.
b. Click the Fields and Views button.
c. A dialog with a list of fields and views appears as shown below:
d. Click the field you want to insert and then Insert shortcode. In our example, we start with the post’s featured image. Your field is added in double curly brackets:
e. Press Save Changes to close the Element dialog.
Repeat the above steps for each of the fields you want to add. In our example, these would be:
- Post Title
- Tour Price (custom price)
- Duration (custom field)
- Tour Types (custom taxonomy)
Once you are done creating the template, press Save all sections at once.
In the next section, we show you how to display this list.
Now that your View is ready, you can insert it anywhere you want: in a page, a WPBakery Page Builder Element, or even a widget.
To insert a View into a regular page built with WPBakery Page Builder simply follow the steps below:
Shortcode is inserted
Besides listing your posts and pages, Toolset allows you to create custom searches and easily display content on a Google map.
This way, you allow visitors to filter the contents by different parameters you enable. Below are some examples of custom searches you can build with Toolset and insert into your pages.
You can limit the list of your posts to display only those that meet specific criteria. For example, we can display only Tour posts that have a custom field, “Special Offer,” marked as checked. This is done using the Query Filter section in the View editor:
If you need assistance with using Toolset in combination with WPBakery Page Builder, please visit our professional support forum dedicated to this topic.