A template is a design, which you create once and defines how all items of the related post type look like on the front-end. When you edit that template, the front-end display for items of that post type updates immediately.

Example

In our example, we’re building a directory site about gyms. We already created a custom post type called “Gyms” and added some custom fields to it. So, each gym is a custom post with some additional information like an address, opening hours, and gym photos.

Now, we want to design how to display single gym posts on the front-end. We do this by creating one template for all gyms.

How-to steps

First, remember to install and activate the Toolset Blocks plugin.

Creating a template

Go to Toolset Dashboard and click the Create Content Template button in the row of the post type you want to design a template for.

Creating a Content Template from the Toolset Dashboard page
Creating a Content Template from the Toolset Dashboard page

Adding fields to the template

To edit templates, you need to be familiar with the WordPress Block Editor. If you’re not, take a few minutes to learn how to use the Block Editor.

Use Toolset blocks to add fields to the template. For example, to display the main post content (body) insert the Single Field block and set its content to come from a Post Content (Body) standard field.

Adding a post content (body) field to a template
Adding a post content (body) field to a template

What’s next?

Display Custom Lists of Content

Need help?

If you run into any problems or need our advice, create a new support ticket and our team will be happy to assist you.