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 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 Recipe - P2 - Using Meta Box and Oxygen
  31. How to Create a Recipe - P3 - Using Meta Box and Elementor
  32. How to Create a Recipe - P4 - Using Meta Box and Bricks
  33. How to Create a Recipe - P5 - Using Meta Box and Zion
  34. How to Create a Recipe - P6 - Using Meta Box and Brizy
  35. How to Create a Recipe - P7 - Using Meta Box and Breakdance
  36. How to Create a Recipe - P8 - Using Meta Box and Kadence
  37. How to Create a Recipe - P9 - Using Meta Box and Divi
  38. How to Create a Recipe with Meta Box Plugin
  39. How to Create a Simple Listing - P2 - Using Meta Box and Bricks
  40. How to Create a Simple Listing - P3 - Using Meta Box and Breakdance
  41. How to Create a Simple Listing - P4 - Using Meta Box and Elementor
  42. How to Create a Team Members Page - P1- Using Meta Box and Elementor
  43. How to Create a Team Members Page - P2 - Using Meta Box and Oxygen
  44. How to Create a Team Members Page - P3 - Using Meta Box and Bricks
  45. How to Create a Team Members Page - P4 - Just Meta Box
  46. How to Create a Team Members Page - P6 - using Meta Box and Breakdance
  47. How to Create a Team Members Page - P7 - Using Meta Box and Kadence
  48. How to Create a Video Gallery Page - P2 - Using Meta Box + Bricks
  49. How to Create a Video Gallery Page - P3 - Using Meta Box and Breakdance
  50. How to Create a Video Gallery Page - P4 - Using Meta Box + Elementor
  51. How to Create a Video Gallery Page - P5 - Using MB Views
  52. How to Create a Video Gallery Page - P6 - Using Meta Box and Zion
  53. How to Create a Video Gallery Page Using Meta Box + Oxygen
  54. How to Create ACF Flexible Content Field with Meta Box
  55. How to Create an Auto-Updated Cheat Sheet in WordPress
  56. How to Create an FAQs Page - P1 - Using Meta Box and Elementor
  57. How to create an FAQs page - P2 - Using Meta Box and Oxygen
  58. How to create an FAQs page - P4 - Using Meta Box and Bricks
  59. How to Create an FAQs Page - P6 - Using MB Views
  60. How to Create an FAQs Page - P7 - Using Meta Box and Divi
  61. How to Create an FAQs Page - P8 - Using Meta Box and Kadence
  62. How to Create an FAQs Page - P9 - Using MB Blocks
  63. How to Create an FAQs Page -P3- Using Meta Box
  64. How to Create Buttons with Dynamic Link using Custom Fields
  65. How to Create Category Thumbnails & Featured Images Using Custom Fields
  66. How to Create Download and Preview Buttons - P1 - Using Meta Box and Bricks
  67. How to Create Download and Preview Buttons - P2 - Using Meta Box and Oxygen
  68. How to Create Download and Preview Buttons - P3 - Using MB Views
  69. How to Create Download Buttons in WordPress - Using Custom Fields
  70. How to Create Dynamic Landing Page in WordPress - P1 - Using Meta Box and Elementor
  71. How to Create Dynamic Landing Page in WordPress - P2 - Using Meta Box and Bricks
  72. How to Create Menus for Restaurants - P1 - Using Meta Box and Elementor
  73. How to Create Menus for Restaurants - P2- Using Meta Box and Bricks
  74. How to Create Notification Using Custom HTML Field
  75. How to Create Online Admission Form for School or University
  76. How to Create Online Reservation Form for Restaurants using Meta Box
  77. How to Create Relationships - P1 - Using Meta Box and Oxygen
  78. How to Create Relationships - P2 - Using Meta Box and Bricks
  79. How to Create Relationships - P3 - Using MB Views
  80. How to Create Relationships - P4 - Using Meta Box and Breakdance
  81. How to Create Taxonomy Thumbnails & Featured Images - P2 - Using Meta Box and Oxygen
  82. How to Create Taxonomy Thumbnails & Featured Images - P3 - Using Meta Box and Bricks
  83. How to Create Taxonomy Thumbnails & Featured Images - P4 - Using MB Views
  84. How to Create YouTube Video Timestamps on WordPress Website - P1 - Using MB Views
  85. How to Display a Video Playlist - P1- Using MB Views
  86. How To Display All Listings On A Map With Meta Box
  87. How to Display Author Bio in WordPress - P1 - Using Meta Box and Bricks
  88. How to Display Author Bio in WordPress - P2 - Using MB Views
  89. How to Display Dynamic Banners in WordPress - P3 - Using MB Views
  90. How to Display Images from Cloneable Fields - P1 - with Gutenberg
  91. How to Display Images from Cloneable Fields - P2 - Using Meta Box and Oxygen
  92. How to Display Images from Cloneable Fields - P3 - with Elementor
  93. How to Display Images from Cloneable Fields - P4 - with Bricks
  94. How to Display Opening Hours for Restaurants - P1 - Using Meta Box + Gutenberg
  95. How to Display Opening Hours for Restaurants - P2 - Using Meta Box and Oxygen
  96. How to Display Product Variations - P1 - Using Meta Box and Gutenberg
  97. How to Display Product Variations - P2 - Using Meta Box and Oxygen
  98. How to Display Product Variations - P3 - Using Meta Box and Bricks
  99. How to Display the Dynamic Banners - P2 - Using Meta Box and Bricks

Leave a Reply

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