There are many different ways to show the latest products in a section on a page using Meta Box and page builders. In this tutorial, we will use Meta Box and Kadence.

We take the restaurants as an example for the posts as well as for the products:

Show the latest products in a section on a page using Meta Box and Kadence.

Video Version

Before Getting Started

As I said before, my products are restaurants. Each restaurant will be a post in a custom post type. In this section, only the 6 latest restaurants will be displayed.

The name of the restaurant and its image are the title and featured image of the post. Further, you may want to add some extra information about your products. I also have something such as logo, voucher, and address. This extra information will be saved in the custom fields created with Meta Box.

For this practice, we need these tools:

  • Meta Box core plugin: to have the framework for creating custom post types and custom fields;
  • MB Custom Post Types: to create a custom post type for the products;
  • Meta Box Builder: to have an intuitive UI to create custom fields in the backend;
  • Kadence: to build the page and create a section to display the latest posts. In this practice, I also use the pro version of Kadence.

Create a New Custom Post Type

Go to Meta Box > Post Types > New Post Type to create a new post type for the products.

Create a new custom post type

Create Custom Fields

Go to Meta Box > Custom Fields to create fields to save some extra information. These are the fields that I’ll create:

The created custom fields

After creating all the fields, move to the Settings tab > Location > choose Post Type as the Restaurants post type to apply these fields to this post type.

Set location for the created fields as post type

Go to the post editor, you will see all of the created custom fields.

All the created fields appear in the post editor

Just fill in the information.

Add the Section to the Homepage

Let’s edit the homepage to create a section for the latest restaurants.

First, add a Heading block.

Add a Heading block to name the section.

To display the wanted posts, we need the Query Loop block.

The Query Loop block to display the wanted posts.

After choosing a template for the Query Loop, you will see some default blog posts displayed.

Default blog posts

Their order is by date and descending. It means that the latest post will be shown first, followed by the older ones. That’s exactly what we want.

Now, our work is just changing the posts from blog posts to restaurants. Before that, you can remove some information from the post if you don’t want to display.

To change the posts to the restaurants, move to the Post Type section on the right sidebar and choose your post type from the list. In this case, it’s Restaurant.

Change the posts to the restaurants.

Look at the picture below! You can see that the titles are replaced by the restaurants’ names.

The restaurants’ names appear.

It’s time to get some information for the restaurants.

First, add the Advanced Image block to display the restaurant’s image.

Add the Advanced Image block to display the restaurant’s image.

There is an icon in the picture below to enable dynamic data for this block. Click on the icon, then choose the Featured Image from the list.

Enable dynamic data for the Advanced Image block.

Next, add a Paragraph block for the voucher information.

Add a Paragraph block for the voucher information.

Click on the Dynamic Data button, and choose Post Custom Field option since the voucher information is saved in a custom field.

After that, in the Custom Field section, we should choose the Custom Input option instead of choosing a field as usual. This is because the Voucher field is the Checkbox List type, and I want to get the label of the selected option from the field.

In the Custom Field section, choose the Custom Input option.

In the Custom Meta Key section, fill in the ID of the Voucher field.

In the Custom Meta Key section, fill in the ID of the Voucher field.

Now, the voucher information will not display, just a text like this will display instead.

The voucher information will not display.

Don’t worry! You will see the right information on the frontend. So, keep moving.

To get the restaurant's address, add another Paragraph block and add dynamic data for it.

To get the restaurant's address, add another Paragraph block and add dynamic data for it.

The logo will be the same as the feature image. So, choose an Advanced Image block and add dynamic data for it. Also choose Post Custom Field, then select the name of the field that saves the logo.

Get the logo information.

If you have more kinds of information for your products, just follow this way to display them.

Finally, I set the number of posts to display in this section as well as change the layout to the Grid style.

Set the number of posts as well as change the layout to the Grid style.

Go to the homepage, you can see all of the information about the restaurants displayed correctly.

All of the information about the restaurants displayed correctly.

Style the Section

Go back to edit the homepage. You can add some classes for the blocks if you want to use some CSS to style them.

Add some classes for the blocks.

You can also change some settings for each block.

For advanced style, you may want to use some CSS. Go to the Customizer section > Additional CSS and add some code.

Go to the Customizer section > Additional CSS and add some code.

I uploaded all of the code on Github, you can refer to it.

After adding some CSS, you can see the new look of the section immediately.

Show the latest products in a section on a page using Meta Box and Kadence.

Last Words

We’ve gone through all the necessary steps to create the latest products section using Meta Box and Kadence. Now, it's time to give it a go and let us know how it turns out! We would love to hear about your experience. Thank you for reading!

 

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 a User List On the Frontend with Meta Box
  9. Display The Latest Products Section - P2 - Using Meta Box and Elementor
  10. Display The Latest Products Section - P3 - Using Meta Box And Oxygen
  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 to WordPress Using Meta Box
  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 FAQs page - P5 - Using Meta Box and Breakdance
  20. How to Create a Product Page - P2 - Using Meta Box and Oxygen
  21. How to Create a Product Page - P3 - Using Meta Box and Bricks
  22. How to Create a Product Page - P4 - Using Meta Box and Elementor
  23. How to Create a Product Page - P5 - Using Meta Box and Gutenberg
  24. How to Create a Product Page - P6 -Using Meta Box and Breakdance
  25. How to Create a Product Page - P7 - Using Meta Box + Kadence
  26. How to Create a Product Page - P8 - Using Meta Box and Brizy
  27. How to Create a Product Page using Meta Box Plugin
  28. How to Create a Recipe - P2 - Using Meta Box and Oxygen
  29. How to Create a Recipe - P3 - Using Meta Box and Elementor
  30. How to Create a Recipe - P4 - Using Meta Box and Bricks
  31. How to Create a Recipe - P5 - Using Meta Box and Zion
  32. How to Create a Recipe - P6 - Using Meta Box and Brizy
  33. How to Create a Recipe - P7 - Using Meta Box and Breakdance
  34. How to Create a Recipe with Meta Box Plugin
  35. How to Create a Simple Listing - P2 - Using Meta Box and Bricks
  36. How to Create a Team Members Page - P1- Using Meta Box and Elementor
  37. How to Create a Team Members Page - P2 - Using Meta Box and Oxygen
  38. How to Create a Team Members Page - P3 - Using Meta Box and Bricks
  39. How to Create a Team Members Page - P4 - Just Meta Box
  40. How to Create a Team Members Page - P6 - using Meta Box and Breakdance
  41. How to Create a Video Gallery Page - P2 - Using Meta Box + Bricks
  42. How to Create a Video Gallery Page - P3 - Using Meta Box and Breakdance
  43. How to Create a Video Gallery Page - P4 - Using Meta Box + Elementor
  44. How to Create a Video Gallery Page - P5 - Using MB Views
  45. How to Create a Video Gallery Page Using Meta Box + Oxygen
  46. How to Create ACF Flexible Content Field with Meta Box
  47. How to Create an Auto-Updated Cheat Sheet in WordPress
  48. How to Create an FAQs Page - P1 - Using Meta Box and Elementor
  49. How to create an FAQs page - P2 - Using Meta Box and Oxygen
  50. How to create an FAQs page - P4 - Using Meta Box and Bricks
  51. How to Create an FAQs Page -P3- Using Meta Box
  52. How to Create Buttons with Dynamic Link using Custom Fields
  53. How to Create Category Thumbnails & Featured Images Using Custom Fields
  54. How to Create Download and Preview Buttons - P1 - Using Meta Box and Bricks
  55. How to Create Download and Preview Buttons - P2 - Using Meta Box and Oxygen
  56. How to Create Download Buttons Using Custom Fields with Meta Box Plugin
  57. How to Create Menus for Restaurants - P1 - Using Meta Box and Elementor
  58. How to Create Menus for Restaurants - P2- Using Meta Box and Bricks
  59. How to Create Online Admission Form for School or University
  60. How to Create Online Reservation Form for Restaurants using Meta Box
  61. How to Create Relationships - P1 - Using Meta Box and Oxygen
  62. How to Create Relationships - P2 - Using Meta Box and Bricks
  63. How to Create Relationships - P3 - Using MB Views
  64. How to Create Taxonomy Thumbnails & Featured Images - P2 - Using Meta Box and Oxygen
  65. How to Display Images from Cloneable Fields - P1 - with Gutenberg
  66. How to Display Images from Cloneable Fields - P2 - with Oxygen
  67. How to Display Images from Cloneable Fields - P3 - with Elementor
  68. How to Display Images from Cloneable Fields - P4 - with Bricks
  69. How to Display Opening Hours for Restaurants - P1 - Using Meta Box + Gutenberg
  70. How to Display Opening Hours for Restaurants - P2 - Using Meta Box and Oxygen
  71. How to Display Product Variations - P1 - Using Meta Box and Gutenberg
  72. How to Display Product Variations - P2 - Using Meta Box and Oxygen
  73. How to Display Product Variations - P3 - Using Meta Box and Bricks
  74. How to Display The Latest Products - P5 - Using Meta Box and Bricks
  75. How to Display the Latest Products - P6 - using Meta Box and Breakdance
  76. How to Display the Latest Products - P7 - Using Meta Box + Kadence
  77. How to Display the Latest Products Section - P4 - Using Meta Box + Zion
  78. How to Display the Most Viewed Posts - P1 - using MB Views
  79. How to Display the Most Viewed Posts - P2 - using Meta Box and Oxygen
  80. How to Display the Most Viewed Posts - P3 - Using Meta Box and Bricks
  81. How to Filter Posts by Custom Fields - P2 - using Meta Box and FacetWP
  82. How to Manually Reorder Posts with Meta Box
  83. How to Show Featured Restaurants on Homepage - P1 - Meta Box + Elementor + WP Grid Builder
  84. How to Show Posts With a Specific Criteria - P3 - Using MB Views
  85. How to Show Posts with Specific Criteria - P1 - Using Meta Box and Bricks
  86. How to Show Posts with Specific Criteria - P2 - Using Meta Box and Oxygen
  87. How to Show Posts with Specific Criteria - P4 - Using Meta Box + Breakdance
  88. How to Show Posts with Specific Criteria - P5 - Using Meta Box and Elementor
  89. How to Show the Featured Restaurants - P3 - using Meta Box and Oxygen
  90. How to Show the Featured Restaurants - P4 - Using MB Views
  91. How to Show the Featured Restaurants - P5 - Using Meta Box and Elementor
  92. How to Show the Featured Restaurants - P6 - Using Meta Box and Zion
  93. How to Show the Featured Restaurants Section - P2 - Using Meta Box and Bricks
  94. How to Use Custom HTML Field to Output Beautiful Texts or Output Custom CSS

Leave a Reply

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