How post relationships and the WPBakery page builder can help build advanced sites

Businesses which have commissioned a new website are driven by one thing – time to market.

Managers want to deliver their products and services as soon as possible. Therefore, they need their website to be up and running without delay but also without compromising on quality.

One of the best ways to achieve this is by combining Toolset’s suite of plugins with WPBakery Page Builder. They allow us to create many advanced solutions without any PHP coding.

And thanks to Toolset’s new post relationship feature, there is now one more advanced but crucial component which we can easily implement. With post relationships, you can create connections between different posts on your website – eliminating data duplication.

We will explore exactly how post relationships and WPBakery will make it easier than ever to build an advanced website by using our demo music website. We will create a website like an image below where bands such as The Proclaimers will be connected to the stages they will play on, such as Bellagio.

First, we’ll explain why Toolset and WPBakery are the best tools to build your next site.

Why Toolset is a great set of plugins to build your website with

You can use Toolset’s suite of plugins to add a number of important features which you would usually consider to be too complex and time consuming to implement. That’s because Toolset allows you to build them without leaving your WordPress dashboard and without relying on any PHP coding.

Some of the great features you can build with Toolset include custom post types, fields, and taxonomies. The result is you can create a powerful website faster than ever before.

These features will look even better when they are added to pages which have been designed by using WPBakery. Incidentally, for more examples of features, you can check out our tutorial for building a website with Toolset and WPBakery.

Why WPBakery is great for advanced websites

By using WPBakery, you can create and manage your content easily through its drag and drop builder. You can create unique websites thanks to its compatibility with any WordPress theme of your choice. Better still, none of this needs any coding at all.

Furthermore, WPBakery comes with ready-to-use content elements which can help you create your own pages within minutes.

Toolset works well with WPBakery because it builds on these great elements by providing more complex features which can take your website to the next level. One of those is post relationships. Let’s take a look at exactly what they are and how they can help you build and run advanced websites.

What are the three post relationships and why do you need them

There are three types of post relationships which you can create with Toolset – each of them performs a specific function on your website.

1. One-to-one relationship

A one-to-one relationship is an exclusive connection between a child post from one custom post with the parent of another. An example is between a car and its own designated car park spot. The car won’t have another parking space and only one car will be assigned to that space.

2. One-to-many relationship

A one-to-many relationship allows a parent post type to be connected with multiple child post types. To illustrate, on a website showing music gigs, the “Venue” parent will host a number of events so will have many “Events” post types connected with it. Of course, each specific event will only take place in one venue.

3. Many-to-many relationship

A many-to-many relationship is a complete package as it lets you create connections between multiple child and parent post types.

If we continue with our live music website example, we can create a many-to-many relationship between music stages around the world and the bands which will perform on them. Each stage will host multiple bands while bands will play at different stages during their tour.

To expand on this example further, let’s take an in-depth look at how you can create this relationship and how it will look on our WPBakery-built website.

How to create a many-to-many relationship using Toolset

You can create a many-to-many relationship with Toolset by following these five steps using its relationship wizard. Let’s go through how we can create a relationship between the “Stages” and “Bands” custom post types.

1. Choose the type of post relationship you want

The first step is to select the relationship we want to create. We will select the “many-to-many relationship” option.

2. Select which post types will be connected

On the next step, we need to choose which post types will have a many-to-many relationship. We will select the “Stages” and “Bands” post types.

3. Limit the number of connections between posts

We now have the chance to limit the number of connections we can make between each of our posts. Let’s imagine that we run a college website and we want to limit the number of students that can take each class, we can use this optional step to ensure we do not exceed the number of available places for each course.

However, in this scenario, we do not need to place any limits so we will move on.

4. Add extra fields to the relationship

Another optional step is to add fields specific to this relationship. For example, if we were combining songs with albums, we might want to add a “Track” custom field so users knew where each song was located. In this situation, we do not require any further fields so we will skip it once again.

5. Name your many-to-many relationship

Now all that is left is to give a name to our newly created relationship which we will call “Attendances.”

Here is how our many-to-many relationship looks:

Now we can start to create our connections and display them on the front-end.

Add your many-to-many relationship connections to your website

We can add and remove connections between post types as we edit each post on the back-end.

Let’s imagine that The Proclaimers have announced they will play on the Electro Square stage. Therefore, we need to create a connection between the two. To do this we can connect The Proclaimers “Bands” post with Electro Square’s “Stage” post.

As we edit Electro Square’s post we can either select “Add new band” to create a brand new band to connect or we can click on “Connect existing band” and add one of the posts we have already created. To add The Proclaimers, we will use the second option.

Here is how it looks on the back-end. Our “Stages” post type is now connected with three “Bands” posts.

And you can also see that The Proclaimers “Bands” post is linked with three “Stages” posts.

We now need to build our template to display these connections which we can achieve with help from WPBakery.

Creating a template for your many-to-many relationship

We can use WPBakery Page Builder to design our page with the content we need along with our new many-to-many relationship.

On the left-hand side of each “Stages” post, we want to display information that will tell users more about the venue such as its capacity. As you can see below we have created a template on the left with the information. Meanwhile, on the right, we will display the “Bands” which are connected.

Thanks to WPBakery, it is simple to organize the layout of each post and ensure everything is exactly where you want it to be.

Here is how it now looks on the front-end:

We are nearly finished with creating our advanced website. However, we still need to add some information to our “Bands” posts. We will explore one of the quickest ways we can do this.

Use repeatable field groups to quickly add sets of information

Toolset’s repeatable field groups feature will help you quickly add sets of the same fields over and over again – saving you a significant amount of time.

Some types of information you will want to display on your website, such as a slideshow, will contain multiple custom fields – the image, caption, and description. Rather than adding each of these fields individually whenever we have a new slide, we can use repeatable field groups to create the same template.

On our “Bands” posts we want to display a slideshow of images from previous gigs. We can create a repeatable field group with two fields: “band photo” and “band description.”

We can now start to add our slides as we edit our posts. Notice how we just need to click on “Add new photos” and the set of field groups appears for us to fill in.

Using our WPBakery Page Builder, we can easily add our slider to our “Bands” template. We have added it at the bottom below the information about the band and the connections with “Stages” post types.

And here is how our “Bands” post now looks on the front-end.

WPBakery and Toolset make it easier to create advanced websites

Combining WPBakery with Toolset makes what once might have been too complicated incredibly simple. Both tools will help you create advanced websites which are perfect for companies which need to display large amounts of data.
WPBakery Page Builder helps you design the website pages you want thanks to its drag and drop feature. Meanwhile, Toolset’s post relationship and repeatable field groups features will help you create invaluable connections between your content while making it easier than ever to add it to your website.

With WPBakery and Toolset, the difference in time and effort between creating a basic and advanced website just got smaller.

Use our exclusive 20% discount to download Toolset today. Don’t forget Toolset comes with a 30 day trial so you can instantly access all the features that will make your website stand out from the online crowd. If you are not happy, they refund you without any questions within 30 days.