Skip to main content

Creating a Product Page - Meta Box + Kadence

There are numerous ways to build ecommerce product pages that I shared in this series. In this article, we’ll share some best practices for product page design by using Meta Box and Kadence.

This is my product page that I’ve created for illustration, you can see as below:

My product page that I’ve created

Video Version

Preparation

This is a single page built with Kadence containing the product's detailed information. Each product is a post of a custom post type. The name of the product and its description are the title and content of the post.

So, in this practice, we need these tools:

1. Creating a Custom Post Type

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

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

After publishing, you will see a new menu displayed. It's your post type.

A new menu displayed

2. Creating Custom Fields

In this practice, I just create some basic fields for typical information of the product.

Some basic fields for typical information of the product

Go to Meta Box > Custom Fields to create them one by one.

Create custom fields one by one

Choosing the Number field for numeric information, such as rental price, car year, and max passengers.

Choosing the Number field for numeric information

For the car year information, you can fill in an example year so that when entering information, users can easily understand and enter the information correctly.

Fill in an example year for the car year information

About the max passengers' information, you also can enter numbers in the Min value and Max value boxes to limit the number of passengers.

Enter numbers in the Min value and Max value boxes to limit the number of passengers

Next one, choose the Select field to contain selective information such as fuel, doors, gearbox. Fill in the options into the Choice box.

Choose the Select field to contain selective information

For other information such as fuel usage, engine capacity, max luggage, select the Text field. In the Input description box, you can add some descriptions to add information to the field.

Add some descriptions to add information to the field

The last one is the gallery. Choose an Image Advanced field to allow users to upload multiple images.

Choose an Image Advanced field to allow users to upload multiple images

After creating all the fields, move to the Settings tab, choose Location as Post type. And then, select Car Rental to apply these fields to this post type.

Apply the fields to post type

3. Creating the Page Template

Go to Appearance > Kadence > Elements > Add New to create a template for your product page.

Create a template for your product page

Choose element type as Template.

Choose element type as Template

Remember to set a preview for this template.

Set a preview for the template

Set the placement for the template as Replace Single Post Content, and choose Single Car Rentals to assign this template to the product single page.

Assign the template to the product single page

Add a Columns block, and choose the 50/50 layout to divide content and images into two columns.

Divide content and images into two columns

In the first column, add an Advanced Gallery block to display product images.

Add an Advanced Gallery block to display product images

Turn on Enable Dynamic Gallery for this block to get images from custom fields.

Turn on Enable Dynamic Gallery for this block to get images from custom fields

Right after that, you will see the Dynamic button on the right sidebar to set the dynamic data for the gallery. Click on it, then choose the Post Custom Field, and choose Gallery, which is the custom field that we created to store the product images.

Set the dynamic data for the gallery

There will be multiple images, so you should set the gallery layout as Slider.

Set the gallery layout as Slider

Set a reasonable size for the images in the Advanced section.

Set a reasonable size for the images in the Advanced section

Move to the second column, add an Advanced Text block for the product name.You also can use the Text block instead, but it has fewer settings for styling than Advanced Text.

Add an Advanced Text block for the product name

Click to the Dynamic button and choose Post Title to automatically get the product name from it.

Choose Post Title to automatically get the product name

Select Advanced Text to display the short description of the product. And, also set the dynamic content for it by clicking the button and pick Post Excerpt.

Set the dynamic content

Next, use the Text or Advanced Text block for the pricing.

Use Advanced Text block for the pricing

Add the unit price in the right form. Then, add dynamic data of pricing from the custom fields in the same way with the gallery.

Add the unit price in the right form

For the remaining product information, we will use the Row Layout block provided by Kadence. Then, you can select the two columns layout.

Use the Row Layout block to remain product information

In the column on the left, add Advanced Text block and type the name of the product characteristic.

Add Advanced Text block and type the name of the product characteristic

In the column on the right, add an Advanced Text as well, then add dynamic data from the corresponding custom field to it.

Add an Advanced Text

You can put this row in the basic style and move on to the next one. For saving time, you can duplicate the created row. Change its name, and field to the right one.

Duplicate the created row and Change its name, and field to the right one

After displaying all the wanted information on the page, you will see it look like this on the frontend.

A product page with Meta Box and Kadence

That’s done for the page.