For those who have a food online order website or something similar, your website will have a lot of restaurants for customers to choose from. Each restaurant definitely has its own menu. So, how to have different menus for them?

Let's see how to do it in this post. We’re going to use custom fields for menus with the support from Meta Box and Elementor in this practice.

Here is my example:

Example of Restaurant's menu

Video Version

Before Getting Started

To get started, we need the Meta Box core plugin to have the framework for creating custom fields. It’s free, so you can download it directly from wordpress.org.

For the advanced features from Meta Box, we need some of its extensions:

They’re all in the Meta Box AIO. If you haven’t had it, you can download and install each one individually.

Finally, make sure you have Elementor Pro on your site.

Step 1: Create a Custom Post Type

Go to Meta Box > Post Types > Add New to create a new post type.

Create a new custom post type

After publishing, we’ll have a new menu named Restaurants.

The post type appear as a menu after creating.

Then, let’s create custom fields in the following step.

Step 2: Create Custom Fields

Go to Meta Box > Custom Fields to create fields. I’ll create all the fields with the structure like this:

Name Field type Settings
Menu Details Group Collapsible
Cloneable
        Name Text -
        Price Text -
        Description Text -
        Image Single Image -

Go to Meta Box then Custom Fields to create fields

This is a group with 4 subfields inside. These subfields are for the dish detail. So, each group will be for a dish only. To add more dishes, set this group to be cloneable.

To add more dishes, set this group to be cloneable.

Then, there’ll be an Add more button to allow adding more dishes.

Then, there’ll be an Add more button to allow adding more dishes.

In the event the restaurant has too many dishes, you can set the group to be collapsible.

In the event the restaurant has too many dishes, you can set the group to be collapsible.

It’ll be tidier when adding information for the menu like this.

Adding information and it show so much tidier

After creating all the fields, move to the Settings tab, choose Location as Post Type and select Restaurant to apply these fields to it.

Move to the Settings tab, choose Location as Post Type and select Restaurant to apply these fields

Then, you can easily see all the created fields in the post editor. Just fill in the dishes’ details.

fill in the dishes’ details with the created fields in post editor

Step 3: Create a Skin

Go to Templates > Theme Builder > Meta Box Group Skin > Add New to create a new skin.

Go to Templates > Theme Builder

Meta Box Group Skin > Add New to create a new skin.

Set the settings for the skin as you want and remember to choose a post for preview. Then, add the Heading element for the name of the dish.

add the Heading element for the name of the dish.

To get the name of the dish saved in custom fields, click the Dynamic Tags button in the settings of the Heading element. There’ll be a list. Choose the Meta Box Field in the Post section.

Choose the Meta Box Field in the Post section.

Note: Since our custom fields are created for a post type, find the Meta Box Field in the Post section. In case the custom fields are for a settings page or something else, look for the Meta Box Field in the corresponding section in the list.

Then, choose the name of the field you want to get the name of the dish from.

Choose the name of the field you want to get the name of the dish from.

For price and description of the dish, add the Text Editor element. Once again, use the Dynamic Tags > Meta Box Fields in the Post section, then choose the corresponding fields.

For the image of the dish, add an Image element. Also use the Dynamic Tags and select the Image field.

For the image of the dish, add an Image element. Also use the Dynamic Tags and select the Image field.

As you can see, it’ll automatically get and display the information saved in the first group (means the 1st dish) only.

Step 4: Create a Template for the Menu

Back to the Theme Builder > Single Post to create a new template for post.

Back to the Theme Builder > Single Post to create a new template for post.

Similar to the skin, remember to set the preview for this template.

Find and add the Meta Box Group element to the template.

Find and add the Meta Box Group element to the template.

Then, there’ll be some posts displayed in the preview. But it may not be the information from the posts you want.

the Object Type of the template is set by default as Post and the Group section will automatically set as the created-lastest group

Look at the left sidebar, the Object Type of the template is set by default as Post and the Group section will automatically set as the created-lastest group. If it is not the group field you want, you can change them to the right one.

Then all the data will be displayed correctly, but there is no styling.

For styling, in the Skin section, choose the skin that you’ve created in the previous step. Then, it will turn to the new look with the style of the created skin.

For styling, in the Skin section, choose the skin that you’ve created in the previous step

To have more styling, you can add some decoration for the template as I did.

To have more styling, you can add some decoration for the template

However, because the elements which are the dish detail are set in the skin, you need to go back to the created skin to style them.

Because the elements which are the dish detail are set in the skin, you need to go back to the created skin to style them

Then all the changes in the skin will be automatically applied in the template.

Here is the result we’ve got after all the styling.

Here is the result we’ve got after all the styling

The Verdict

Do you see that using custom fields to have a menu for each restaurant is a brilliant way? If you see this practice is helpful, try it and share the result with us.

If you are using other ways, wait for our upcoming tutorials. Keep track of our blog and good luck!

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 *