Back to contents

How to display the content from meta fields in Smart Posts List and Posts Tiles widgets

Find out from this tutorial how to display the content from meta fields in Smart Posts List and Posts Tiles widgets with JetBlog plugin.

Meta fields are used to add extra information or content of almost any type. For example, it could be special data for all events created before to arrange the necessary ones. Or it might be the goods on the site that you want to range by the data when the sale-on discount is expiring. The examples of practice are plenty.

So if you read this tutorial, we hope you’ll know more about this option.

Now let’s start our handy guide to perform the changes.

Preparations

Before the following steps ensure that you’ve installed and activated the JetEngine plugin. It will help us to add the necessary information simply without the deep knowledge of the code. Thanks to our developers we can manage to display the content from meta fields in posts.

JetEngine settings in the WP Dashboard

Step 1 – Firstly, you should proceed to the WP Dashboard > JetEngine > Meta Box. Here add the new one with the so-named button.

Step 2 – Then, in the following screen fill in the Name, select in the Meta Box for dropdown Post option.

Meta Box settings in WP Dashboard

Step 3 – The next dropdown is called Post types and here you have to choose Posts.

Posts settings

Step 4 – The next block is Meta Fields where you need to fill in gaps with the correspondent information: add the Title, ID, type, etc.

Step 5 – Scroll up and click on Add Meta Box button.

The posts setting in the WP Dashboard

Step 1 – We are still in the WP Dashboard. Now choose the Posts > All posts option. Select the one you want to change and click on the Edit link.

Step 2 – Click to the Settings button that is in the upper-right of the screen.

Options settings

Step 3 – Choose Options in the end of the list and tick in the following screen Custom Fields. It is situated in the Advanced Panels block.

Step 4 – Then scroll until you reach the block with the name of Meta Box you’ve created.

Step 5 – Here you should choose the content to be displayed. In my case, it contains the image, link and time options.

Step 6 – When everything is done, Update your settings on the right corner button.

The final settings in Elementor editor

Step 1 – Go to the Elementor editor with dropped the Smart Posts list and Posts Tiles widgets.

Step 2 – Click on Edit button of the selected widget. Then proceed to the Content > Custom Fields tab.

Step 3 – Choose the position of Meta to be shown with the toggle.

Step 4 – Click on the Item #1 dropdown.

Adding the image in Elementor

Step 5 – Fill in the Key field with the Name (or the ID) of the section you’ve previously created. In my case, the names are “image”, “link” and “time”. If you have several ones, as I do, disjoint them. For each Meta Field data, you have to add the new item.

Step 6 – Enter the Label if you have, for example, the link. You might skip this option you haven’t got text data.

Step 7 – In the dropdown Prepare meta value with callback choose the most suitable option. For example, for an image, it could be the “wp_get_attachment_image”.

Step 8 – Update and preview your changes.

Here you are! Frankly speaking, the devil is not so terrible as he is painted.

Following our simple steps, it’s possible to showcase the content with the help of meta fields.