Continuing our series on creating a simple listing with Meta Box and page builders, today we’re using another one, Elementor. This time, we also use custom fields and taxonomies from Meta Box to showcase product information on an archive page as well as filter it easily.

As an example, we have an archive page with a list of restaurants.

An example of an archive page that shows a list of products.

Video Version

Before Getting Started

There’s something we should clarify before getting started.

In the backend, we will need a custom post type for the products as well as the restaurants, and each one of them will be saved in a post. The restaurant’s name and image are the title and feature images of the post. We also have some extra information for the restaurant, that your products also might have as well, and all of them will be saved in different custom fields.

On the frontend, means the listing page, we’ll divide the page into 2 sections: one to display the products and their information, and one for the filter.

2 sections of the page: one to display the products and their information, and one for filters

Each box like this image below is for each product, and we will create a template in the type of a loop item in Elementor to get the product information.

Create a loop item template to get information about a product.

The filter is based on the voucher information that is created in the form of a taxonomy. Each one is a term of that taxonomy.

Before going ahead, let's check which tools are needed for this practice.

To create a custom post type, taxonomy, and custom fields for products, we need the Meta Box core plugin. You can install it directly from wordpress.org. Besides, you may want some Meta Box extensions for the advanced features. You can install them individually or use Meta Box AIO.

Here are the extensions we need:

  • MB Custom Post Type: to create a custom post type and custom taxonomies for products;
  • Meta Box Builder: to have a UI on the backend to create the custom field efficiently;
  • MB Views (optional): to get and display the status of the restaurants;
  • MB Admin Columns (optional): to display custom fields as a column in the admin screen.

Finally, we’ll use Elementor to build the page and use Elementor Pro, which has integration with Meta Box, to display the information from custom fields.

Create a New Post Type

Go to Meta Box > Post Types to create a new post type for your products.

Create a new post type for your products

After publishing, you will see a new menu in your dashboard. It’s your post type.

Create Custom Fields

Your products may have some extra information, so we need custom fields in this case. Just go to Meta Box > Custom Fields > Add New to create some fields for it.

Go to Meta Box > Custom Fields to create some custom fields for your products’s extra information

I just create some typical ones for illustration purposes only.

After creating all the needed fields, go to the Settings tab. Choose Location as Post type and select Restaurant to apply these fields to this post type.

Set location to apply the fields to your product post type.

Create a New Taxonomy

As mentioned, we’ll have a filter on the page based on a taxonomy. I will divide the vouchers into some discount levels, and each one of them will be a term of the taxonomy. So let’s move on to create them.

Go to Meta Box > Taxonomies to create a new taxonomy.

Go to Meta Box > Taxonomies to create a new taxonomy

In the Advanced section, check the Hierarchical box if you want to show the taxonomy in a hierarchy.

If you want to display it as a column in the admin screen, check the Show admin column box. This setting is available when you have the MB Admin Columns extension.

In the Advanced section, check the Hierarchical option to show the taxonomy in a hierarchy, and Show admin column option to show it as an admin column

In the Post Types tab, choose the product post type that you’ve just created to apply this taxonomy to it.

Choose the products post type to apply taxonomy to it.

Now, you can add some terms to your product’s taxonomy.

Add some term for your product’s taxonomy

Now, in the post editor of your products, you will see the custom fields as well as the voucher items appearing on the right sidebar.

The terms of the created taxonomy and the custom fields displayed in the post editor

Just input data into them.

Here are some example posts that I've created. And you can easily view the voucher information from the created taxonomy directly in the admin column.

The voucher information from the created taxonomy directly in the admin column.

Display the Product Information

As I mentioned before, we should create a loop item template to display all the expected information about the product first. So, go to the Elementor Theme Builder and create it.

Go to the Elementor Theme Builder to create a loop item.

Create a loop item template to display all the expected information about the product.

Remember to set the preview.

Set the preview for the template

First, add a section with a one-column layout to contain all the information about a product.

Add a section with a one-column layout to contain all the information about a product

Now, add some elements to display the product’s information.

To display the restaurant’s image, add the Featured Image element.

Add the Featured Image element to display the restaurant’s image.

For the name of the restaurant, choose the Post Title element as the restaurant’s name is the post title.

Choose the Post Title element as the restaurant’s name is the post title

Go ahead! Add a Text Editor element for the restaurant’s address. Since this information is saved in custom fields created by Meta Box, use the Dynamic Tags, find the Meta Box Field in the Post section, and then choose the corresponding fields.

Add a Text Editor element for the restaurant’s address and use Dynamic Tags

Choose the right field to get the restaurant’s address.

Now, the restaurant’s address is displayed immediately.

The restaurant’s address is displayed

In the same way, choose an Image element to show the logo. Also, use the Dynamic Tags to connect this element with the field. Then, you can see the logo of the restaurant.

Choose an Image element to show the logo

The last thing is the status. It has two colors and will change based on the values saved in the custom fields. To make it auto-changed, we should use a dynamic class, then use CSS to make it the right color automatically. But Elementor doesn't support dynamic classes. So, I will use the MB Views to display the status of the restaurant.

Now, go to Meta Box and create a new view. Then, add some code to the Template tab.

Use the MB Views to display the status of the restaurant.

In there:

{% set restaurant_status = mb.rwmb_meta('status') %}: is to create a variable to get the value from the Status field. We use the rwmb_meta('status') function to get value. And status is the ID of the field.

We have a condition. If the variable receives the value as open, we will name a class as restaurant-status open. Otherwise, if the returned value is close, we will name a class as restaurant-status close.

Now, set this template as a shortcode.

Set the template as a shortcode

After publishing, a shortcode is generated automatically. Just copy it.

A shortcode is generated automatically

Back to edit the template for your products, choose a Shortcode element. And paste the created one in this box below.

Choose a Shortcode element and paste the created one.

So, we’ve done a loop item for the product. Let’s move on.

Create the Page

Go to Pages and create a new one, as usual.

Create a new page for the products

Get Posts

For displaying posts, I meant products, we had a template for each post. So now, add the Loop Grid element.

Add the Loop Grid element

Choose the template that we have created.

Choose the template that we have created

You can see that some blog posts display in the form that we set for the template, but they are wrong. They are blog posts by default.

To replace them with your products, go to the Query section and choose the Source as your product’s post type.

To replace default posts with your products, choose the Source as your product’s post type.

Then, all of the posts in that post type will display.

All of the posts in that post type will display

All the information about my product is displayed, except the status. We will fix it using CSS later.

Add Filters

For the filter section, just add the Taxonomy Filter element to the place you want.

For the filter section, add the Taxonomy Filter element

Then, select a loop grid and the taxonomy we used for the voucher. After that, a list of the discount levels that we set as the terms of the taxonomy will be displayed.

Select a loop grid and the taxonomy we used for the voucher

You can see how it works on the frontend. The status doesn’t display since it is still a class and hasn't been set to display yet.

The status doesn’t display since it is still a class and hasn't been set to display yet.

Style the Page

Go back to the created template as a loop item for each product. Just customize each element's settings to have the best look for product information.

Customize each element's settings

In the page editor, do so with the settings of each element.

To display and style the restaurant status, we will add some CSS.

Add some CSS to display and style the restaurant status.

In there:

These lines of code are to regulate the shape:

.restaurant-status {
width:20px;
height:20px;
border-radius:50%;
}

background:#26e126 and background:#eee are the different colors used for the .restaurant-status.open{ class and the .restaurant-status.close{ class, respectively.

As a result, there is a new dot in the image of each product. Some are green, and some are gray.

Here is the final look of my simple listing page.

The final look of my simple listing page

Last Words

With the help of Elementor, creating a simple listing page became easy, especially for those who hadn’t known much about coding. If you are looking for a listing page with advanced filters, please refer to this tutorial.

Give it a go and share your results in the comments. Stay tuned for more tutorials coming soon!

Other case studies you might be interested in

  1. Create A Dynamic Landing Page in WordPress Using Custom Field
  2. Create a Filter to Find Hotels by Location
  3. Create an OTA Website Like Booking.com with Meta Box Plugin - P1: Create a Page to Introduce Hotel Rooms
  4. Create an OTA Website Like Booking.com with Meta Box Plugin - P2: Create Filters on the Archive Page
  5. Create an OTA Website Like Booking.com with Meta Box Plugin - P3: Create Filters for Single Hotel Pages
  6. Create Dynamic Favicon in WordPress using Meta Box plugin
  7. Create Posts Series in WordPress Using Meta Box
  8. Display The Latest Products Section - P2 - Using Meta Box and Elementor
  9. Display The Latest Products Section - P3 - Using Meta Box And Oxygen
  10. How to Add Custom Fields for WooCommerce - P2 - Using MB Views
  11. How to Add Custom Fields to Display Banners using Meta Box Plugin
  12. How to Add Guest Authors and Guest Posts - Using Meta Box
  13. How to Add Related Posts - Using Custom Fields
  14. How to Build a Hotel Booking Website Using Meta Box - P1
  15. How to Build a Hotel Booking Website Using Meta Box - P2 - Booking Page in Backend
  16. How to Build a Hotel Booking Website Using Meta Box - P4 - Booking Management Page
  17. How to Build a Hotel Booking Website Using Meta Box – P3 – Booking Page for Customer
  18. How to Create a Classified Ads Website using Meta Box
  19. How to Create a Custom 404 Page in WordPress - P1 - Using Meta Box and Elementor
  20. How to create a FAQs page - P5 - Using Meta Box and Breakdance
  21. How to Create a Product Page - P2 - Using Meta Box and Oxygen
  22. How to Create a Product Page - P3 - Using Meta Box and Bricks
  23. How to Create a Product Page - P4 - Using Meta Box and Elementor
  24. How to Create a Product Page - P5 - Using Meta Box and Gutenberg
  25. How to Create a Product Page - P6 -Using Meta Box and Breakdance
  26. How to Create a Product Page - P7 - Using Meta Box + Kadence
  27. How to Create a Product Page - P8 - Using Meta Box and Brizy
  28. How to Create a Product Page - P9 - Using Meta Box and Divi
  29. How to Create a Product Page using Meta Box Plugin
  30. How to Create a Reading Progress Bar in WordPress Posts - P1 - Using MB Views
  31. How to Create a Recipe - P2 - Using Meta Box and Oxygen
  32. How to Create a Recipe - P3 - Using Meta Box and Elementor
  33. How to Create a Recipe - P4 - Using Meta Box and Bricks
  34. How to Create a Recipe - P5 - Using Meta Box and Zion
  35. How to Create a Recipe - P6 - Using Meta Box and Brizy
  36. How to Create a Recipe - P7 - Using Meta Box and Breakdance
  37. How to Create a Recipe - P8 - Using Meta Box and Kadence
  38. How to Create a Recipe - P9 - Using Meta Box and Divi
  39. How to Create a Recipe with Meta Box Plugin
  40. How to Create a Simple Listing - P2 - Using Meta Box and Bricks
  41. How to Create a Simple Listing - P3 - Using Meta Box and Breakdance
  42. How to Create a Simple Listing - P4 - Using Meta Box and Elementor
  43. How to Create a Team Members Page - P1- Using Meta Box and Elementor
  44. How to Create a Team Members Page - P2 - Using Meta Box and Oxygen
  45. How to Create a Team Members Page - P3 - Using Meta Box and Bricks
  46. How to Create a Team Members Page - P4 - Just Meta Box
  47. How to Create a Team Members Page - P6 - using Meta Box and Breakdance
  48. How to Create a Team Members Page - P7 - Using Meta Box and Kadence
  49. How to Create a Video Gallery Page - P2 - Using Meta Box + Bricks
  50. How to Create a Video Gallery Page - P3 - Using Meta Box and Breakdance
  51. How to Create a Video Gallery Page - P4 - Using Meta Box + Elementor
  52. How to Create a Video Gallery Page - P5 - Using MB Views
  53. How to Create a Video Gallery Page - P6 - Using Meta Box and Zion
  54. How to Create a Video Gallery Page Using Meta Box + Oxygen
  55. How to Create ACF Flexible Content Field with Meta Box
  56. How to Create an Auto-Updated Cheat Sheet in WordPress
  57. How to Create an FAQs Page - P1 - Using Meta Box and Elementor
  58. How to create an FAQs page - P2 - Using Meta Box and Oxygen
  59. How to create an FAQs page - P4 - Using Meta Box and Bricks
  60. How to Create an FAQs Page - P6 - Using MB Views
  61. How to Create an FAQs Page - P7 - Using Meta Box and Divi
  62. How to Create an FAQs Page - P8 - Using Meta Box and Kadence
  63. How to Create an FAQs Page - P9 - Using MB Blocks
  64. How to Create an FAQs Page -P3- Using Meta Box
  65. How to Create Buttons with Dynamic Link using Custom Fields
  66. How to Create Category Thumbnails & Featured Images Using Custom Fields
  67. How to Create Download and Preview Buttons - P1 - Using Meta Box and Bricks
  68. How to Create Download and Preview Buttons - P2 - Using Meta Box and Oxygen
  69. How to Create Download and Preview Buttons - P3 - Using MB Views
  70. How to Create Download Buttons in WordPress - Using Custom Fields
  71. How to Create Dynamic Landing Page in WordPress - P1 - Using Meta Box and Elementor
  72. How to Create Dynamic Landing Page in WordPress - P2 - Using Meta Box and Bricks
  73. How to Create Menus for Restaurants - P1 - Using Meta Box and Elementor
  74. How to Create Menus for Restaurants - P2- Using Meta Box and Bricks
  75. How to Create Notification Using Custom HTML Field
  76. How to Create Online Admission Form for School or University
  77. How to Create Online Reservation Form for Restaurants using Meta Box
  78. How to Create Reading Time to Your WordPress Posts - Using MB Views
  79. How to Create Relationships - P1 - Using Meta Box and Oxygen
  80. How to Create Relationships - P2 - Using Meta Box and Bricks
  81. How to Create Relationships - P3 - Using MB Views
  82. How to Create Relationships - P4 - Using Meta Box and Breakdance
  83. How to Create Taxonomy Thumbnails & Featured Images - P2 - Using Meta Box and Oxygen
  84. How to Create Taxonomy Thumbnails & Featured Images - P3 - Using Meta Box and Bricks
  85. How to Create Taxonomy Thumbnails & Featured Images - P4 - Using MB Views
  86. How to Create YouTube Video Timestamps on WordPress Website - P1 - Using MB Views
  87. How to Display a Video Playlist - P1- Using MB Views
  88. How To Display All Listings On A Map With Meta Box
  89. How to Display Author Bio in WordPress - P1 - Using Meta Box and Bricks
  90. How to Display Author Bio in WordPress - P2 - Using MB Views
  91. How to Display Dynamic Banners in WordPress - P3 - Using MB Views
  92. How to Display Images from Cloneable Fields - P1 - with Gutenberg
  93. How to Display Images from Cloneable Fields - P2 - Using Meta Box and Oxygen
  94. How to Display Images from Cloneable Fields - P3 - with Elementor
  95. How to Display Images from Cloneable Fields - P4 - with Bricks
  96. How to Display Opening Hours for Restaurants - P1 - Using Meta Box + Gutenberg
  97. How to Display Opening Hours for Restaurants - P2 - Using Meta Box and Oxygen
  98. How to Display Product Variations - P1 - Using Meta Box and Gutenberg
  99. How to Display Product Variations - P2 - Using Meta Box and Oxygen

Leave a Reply

Your email address will not be published. Required fields are marked *