This article will explain how you can add the related posts to your Thrive Theme Builder templates.
The way in which you can achieve this is by using a "Post List" element and setting the "Filter Posts" option accordingly.
First of all, open the template that you want to add the related posts into, in the Thrive Theme Builder editor. For that, look for it in the "Templates" section of the Thrive Theme Builder dashboard, and click on "Edit":
Note: Keep in mind that you will not be able to set the "Related Posts" option when editing a "List" Template with the "Blog" content type.
Then, once the template opens in the editor, click on the plus sign from the right sidebar:
The list of elements will open. Look for the "Post List" element, and drag and drop it in the editor:
Check out this article if you want to find out more information about how to customize this element.
When you add the element to the editor, a pop-up will open, where you will have to choose its template. Scroll down to see all of them, and click on the one you prefer in order to apply it to the element:
All of the "Post List" element options will appear in the left sidebar. Click on the "Filter Posts" option:
A pop up will show up on the screen, containing all sorts of options regarding what content you would like to display in the element:
You will see two different tabs: the “Custom Query” tab and the “Related Posts” tab. For the purpose of this article, we will only be interested in the "Related Posts" tab, but you can click here if you want to find out how to use the "Custom Query" one.
You are able to display posts that are related to the post on which you have applied the template that your “Post List” element is displayed.
For this, click on the “Related Posts” tab to open its options:
Then, you can set the criteria after which the posts should be displayed:
Here are the four criteria you can choose from:
Formats (for e.g. Video Post, Audio Post, etc.)
As an example, if you choose to "Display posts related to the current page by the following criteria: Categories", this means that the posts with the same category as the post that you have applied this template to will be displayed by the "Post List" element.
Besides the criteria, you can also choose how to arrange/sort, and display the related posts. These options are described here.
When you finish setting up all of the options, click on the green "Save and Close" button:
The "Post List" element will then display the posts with the same category.
You might be wondering what happens if there are no related articles to be shown. In that case, after you click on the "Save and Close" option, a small notification pop-up will appear, like so:
By default, the "Post List" element will display the following message:
However, if you want, you can change this message. If you go back to the "Related Posts" tab, the last option is the "If there are no results show this message" one. You can delete the default text from the field next to it, and write in your own:
After setting everything up, don't forget to click on the "Save Work" button, from the bottom left side of the editor, to save the modifications:
This is how you can set the "Related Posts" to be shown in a template.
Make sure to check out the rest of the tutorials and articles from our knowledge base, for more information about various Thrive Theme Builder features.
I hope this article was useful. If so, please reward our efforts with a smile below :)