<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: WP Meta Box Plugin</title>
    <description>The latest articles on DEV Community by WP Meta Box Plugin (@wpmetabox).</description>
    <link>https://dev.to/wpmetabox</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F431284%2F26ed2ac5-67ce-4754-a86b-16f665b3073a.jpg</url>
      <title>DEV Community: WP Meta Box Plugin</title>
      <link>https://dev.to/wpmetabox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wpmetabox"/>
    <language>en</language>
    <item>
      <title>How to Create a Recipe - P7 - Using Meta Box and Breakdance</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 28 Mar 2023 02:15:21 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-create-a-recipe-p7-using-meta-box-and-breakdance-j7b</link>
      <guid>https://dev.to/wpmetabox/how-to-create-a-recipe-p7-using-meta-box-and-breakdance-j7b</guid>
      <description>&lt;p&gt;In the previous posts of &lt;a href="https://metabox.io/series/recipe/"&gt;this series&lt;/a&gt;, we’ve gone through some ways to create a Recipe page using page builders. In today's practice, we're going to find out how to do it with another page builder: &lt;strong&gt;Breakdance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is the singular page that I created as an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qs5gE_v8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/b2lJYVn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qs5gE_v8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/b2lJYVn.png" alt="Example of the created page" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/ybqLQFFMu5c"&gt;https://youtu.be/ybqLQFFMu5c&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;Each recipe is saved in a post of a custom post type and further information such as time, ingredients and so on will be saved in custom fields. So, we need &lt;a href="https://wordpress.org/plugins/meta-box/"&gt;Meta Box core plugin&lt;/a&gt; to have a framework for creating custom post types and custom fields easily. It’s free and you can download it directly from &lt;a href="https://wordpress.org/plugins/meta-box/"&gt;wordpress.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the advanced features from Meta Box, we need some of its extensions:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/"&gt;MB Custom Post Types &amp;amp; Custom Taxonomies&lt;/a&gt;: to create custom post types and custom taxonomies;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They’re all in the &lt;strong&gt;Meta Box AIO&lt;/strong&gt;. If you haven’t had it, you can download and install each one individually.&lt;/p&gt;

&lt;p&gt;Since this page is built by &lt;strong&gt;Breakdance&lt;/strong&gt;, make sure you have it on your site.&lt;/p&gt;

&lt;h2&gt;Create a New Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; Add New&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j4EEqeIC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ngEWCuU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j4EEqeIC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ngEWCuU.png" alt="Create a new post type" width="880" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After publishing, you will see a new &lt;strong&gt;Recipes&lt;/strong&gt; menu like this in the Admin Dashboard.&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt;. Here are the fields that I created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oj3poghs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/9dC6gk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oj3poghs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/9dC6gk0.png" alt="Create custom fields" width="880" height="686"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a special field that is one for video. Instead of using the &lt;strong&gt;URL&lt;/strong&gt; field to save the video link, I use &lt;strong&gt;oEmbed&lt;/strong&gt;. This field type allows us to display the video preview directly on the frontend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SSn77nEO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NVj2YIs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SSn77nEO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NVj2YIs.png" alt="Use oEmbed field so that video will display on the frontend" width="880" height="555"&gt;&lt;/a&gt;&lt;br&gt;
After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tabs, choose &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post Type&lt;/strong&gt; and select &lt;strong&gt;Recipe&lt;/strong&gt; to apply these fields to this custom post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KwDyBVz8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CqTqmfu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KwDyBVz8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CqTqmfu.png" alt="Set Location for the created custom fields" width="880" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you can easily see all the created fields in the post editor. Just fill in data into them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cwfHICu2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/1COAwYl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cwfHICu2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/1COAwYl.png" alt="Created fields in the post editor" width="880" height="776"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create a Template for the Page&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Breakdance &amp;gt; Add New&lt;/strong&gt; to create a new template for the single post page of the recipe.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---jq9zExV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jDvuObS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---jq9zExV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jDvuObS.png" alt="Create a template for the page" width="880" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, add a &lt;strong&gt;Section&lt;/strong&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jiBfz5SD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/pKq3HSB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jiBfz5SD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/pKq3HSB.png" alt="Add a Section element" width="880" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since the name of the recipe is the title of the post, add a &lt;strong&gt;Post Title&lt;/strong&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LP36gJ7g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/A0dIWfB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LP36gJ7g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/A0dIWfB.png" alt="Add a post title element" width="880" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ll use some &lt;strong&gt;Div&lt;/strong&gt; tags to divide content into sections and columns as you can see here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6qgMH0iU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/rpzhu6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6qgMH0iU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/rpzhu6a.png" alt="Add some Div tags to divide content into sections and columns" width="880" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, add the &lt;strong&gt;Post Featured Image&lt;/strong&gt; element to display the picture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---pX8tE9R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/HWqygXv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---pX8tE9R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/HWqygXv.png" alt="Add a Post Featured Image element to display the picture" width="880" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cooking time and others similar are in another column, so I also add another &lt;strong&gt;Div&lt;/strong&gt; element. Adding a &lt;strong&gt;Text&lt;/strong&gt; element inside, then insert dynamic data to it. Choose the corresponding field of the kind of time you want to display from the &lt;strong&gt;Metabox&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KyX-keth--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/L6misJ7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KyX-keth--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/L6misJ7.gif" alt="Add another Div element" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll immediately see the number here. To know which kind of it, you can add a prepend or append text for the element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SqTLGyss--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/sk1T0V9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SqTLGyss--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/sk1T0V9.gif" alt="The number will be displayed" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For others, duplicate the element, then change the connecting field as well as the append text.&lt;/p&gt;

&lt;p&gt;Leave this first section with two columns, add a new &lt;strong&gt;Div&lt;/strong&gt; element for the new section. Add a heading for it. For the content that saves in the corresponding custom field, add a &lt;strong&gt;Text&lt;/strong&gt; element, then insert data from that field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--suofHZel--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/BI0adPM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--suofHZel--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/BI0adPM.png" alt="Add a Text element" width="880" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do likewise with other sections or just &lt;strong&gt;duplicate&lt;/strong&gt; this &lt;strong&gt;Div&lt;/strong&gt; element. Also change the heading, and the connecting field of the Text element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GdghaYIX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/YY999qW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GdghaYIX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/YY999qW.png" alt="Do likewise with other sections" width="880" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the &lt;strong&gt;Video&lt;/strong&gt; section, instead of using &lt;strong&gt;Text&lt;/strong&gt; element, I’ll use &lt;strong&gt;Video&lt;/strong&gt; element and connect it with the Video field. There is the preview because I set the custom field in the type of &lt;strong&gt;oEmbed&lt;/strong&gt;. In the case you use any other field type, the URL may display in the kind of text instead of a video preview.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--og2hCKjK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/nemx9PL.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--og2hCKjK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/nemx9PL.png" alt="The URL may display like this" width="880" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’ve done all the information about the recipe.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9T1v9SBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/8N3nYdZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9T1v9SBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/8N3nYdZ.png" alt="All the information has been obtained" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Page&lt;/h2&gt;

&lt;p&gt;Still in the template editor, change the settings of each element to have as your desire. Just customize one by one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VqXRzWsb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/HF13yjr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VqXRzWsb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/HF13yjr.png" alt="Style the Page" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you will see the new look of the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qs5gE_v8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/b2lJYVn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qs5gE_v8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/b2lJYVn.png" alt="The final result" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;We’ve found out &lt;strong&gt;how to create a Recipe&lt;/strong&gt; &lt;strong&gt;page&lt;/strong&gt; using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Breakdance.&lt;/strong&gt; In the event that you use other page builders, refer more here. Or if you want to suggest any tutorials, feel free to leave a comment and keep track of our blog. Thanks for reading!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dynamicdata</category>
      <category>breakdance</category>
      <category>customfields</category>
    </item>
    <item>
      <title>How to Show Posts with Specific Criteria - P2 - Using Meta Box and Oxygen</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 21 Mar 2023 02:23:34 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-show-posts-with-specific-criteria-p2-using-meta-box-and-oxygen-199m</link>
      <guid>https://dev.to/wpmetabox/how-to-show-posts-with-specific-criteria-p2-using-meta-box-and-oxygen-199m</guid>
      <description>&lt;p&gt;If you’re having an e-commerce website and there are some on-sale products, you may want to display them on a page for the promotion campaign only. In this practice, we’ll find out how to &lt;strong&gt;show posts with this kind of specific criteria&lt;/strong&gt; using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Oxygen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is the archive page that I created as an example. Only products are on sale will be displayed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y-L6KstC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/MHBfXXi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y-L6KstC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/MHBfXXi.png" alt="Example of the created archive page" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/MeshaXL1hrg"&gt;https://youtu.be/MeshaXL1hrg&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;The products will be the dishes which are posts of a custom post type. In addition to the basic information of the dishes such as the name, description and the image of the dish, there may be some extra information. They’ll be saved in custom fields.&lt;/p&gt;

&lt;p&gt;In this case, I have two fields in order to save the original price and the promotional price. All the dishes, which have the promotional price, are on sale and will be displayed on the page.&lt;/p&gt;

&lt;p&gt;In this practice, we need these tools:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/"&gt;Meta Box core plugin&lt;/a&gt;: to have a framework to create custom post types and custom fields;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/"&gt;MB Custom Post Types &amp;amp; Custom Taxonomies&lt;/a&gt;: to create custom post types;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/mb-admin-columns/"&gt;MB Admin Columns&lt;/a&gt; (optional): to display custom fields as an admin column.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since we will use Oxygen to build the page, make sure you have it on your site and use version 3.9 or upper to have full integration with Meta Box.&lt;/p&gt;

&lt;h2&gt;Create a Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box&lt;/strong&gt; &amp;gt; &lt;strong&gt;Post Types&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add New&lt;/strong&gt; to create a new post type for the dishes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F6OlsCzI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CKjbLOa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F6OlsCzI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CKjbLOa.png" alt="Create a custom post type" width="880" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you will see a new menu like this in the &lt;strong&gt;Admin Dashboard&lt;/strong&gt;. It’s your post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IP9-nFhc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/R2aQTR2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IP9-nFhc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/R2aQTR2.png" alt="New menu displays in the admin dashboard" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box&lt;/strong&gt; &amp;gt;&lt;strong&gt; Custom Fields&lt;/strong&gt; to create a new field group.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n0Yf59OH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/kNWolvM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n0Yf59OH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/kNWolvM.png" alt="Create custom fields" width="880" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are 2 fields I created as an example. The value stored in these 2 fields will be set to the condition to choose which dishes will be displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z1iQzV_5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/4tVvhFa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z1iQzV_5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/4tVvhFa.png" alt="Created fields" width="880" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since I want to know which dishes are having promotion, I set to show both these fields as an admin column like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J8kwvw9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jqpINJ5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J8kwvw9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jqpINJ5.png" alt="Show created fields as admin columns" width="880" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To do it, you will need to tick this box in both fields. You will have this setting when you enable the &lt;strong&gt;MB Admin Columns&lt;/strong&gt; extension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hMpkYrIQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/LBf4rOE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hMpkYrIQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/LBf4rOE.png" alt="Set the created fields as show as admin column" width="880" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post type&lt;/strong&gt; &amp;gt; select &lt;strong&gt;Cuisines&lt;/strong&gt; to apply these fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1gzoi-QP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/i7P3f45.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1gzoi-QP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/i7P3f45.png" alt="Set location for the created fields" width="880" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you’ll see all the created custom fields in the post editor of the &lt;strong&gt;Restaurants&lt;/strong&gt; post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3FqQtcfj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ciVVdkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3FqQtcfj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ciVVdkh.png" alt="All the created fields appear in the post editor" width="880" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create the Archive Page&lt;/h2&gt;

&lt;h3&gt;Create a Template&lt;/h3&gt;

&lt;p&gt;Go to &lt;strong&gt;Oxygen&lt;/strong&gt; &amp;gt; &lt;strong&gt;Templates&lt;/strong&gt; to create a new template for the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C5QYfDLH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/OheUDtP.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C5QYfDLH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/OheUDtP.png" alt="Create a template" width="880" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, create a new page. Note to set the created template to apply it to the page. Then, just &lt;strong&gt;edit the created page with Oxygen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EAnYzfwx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DvEbLMh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EAnYzfwx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DvEbLMh.png" alt="Edit with Oxygen" width="880" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember to set a preview for the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--be75vvFm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/KjOWO0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--be75vvFm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/KjOWO0g.png" alt="Set preview for the page" width="880" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, add a &lt;strong&gt;Section&lt;/strong&gt; component to contain all the posts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5ajOuZuz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/AiqHWlY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5ajOuZuz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/AiqHWlY.png" alt="Add a Section component" width="880" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, to have a page title, add a &lt;strong&gt;Heading&lt;/strong&gt; component &amp;gt; &lt;strong&gt;Insert Data&lt;/strong&gt; button and choose &lt;strong&gt;Title&lt;/strong&gt; in the &lt;strong&gt;Post&lt;/strong&gt; section to get the name automatically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9dPllos8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/wJxruOF.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9dPllos8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/wJxruOF.gif" alt="Add a Heading component" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To set content in sections for easy styling later, you should use some &lt;strong&gt;Div&lt;/strong&gt; components.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zNhvg0jC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/FjHdFAJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zNhvg0jC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/FjHdFAJ.png" alt="Use some Div component" width="880" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Add the Condition to Display Posts&lt;/h3&gt;

&lt;p&gt;Next, add a &lt;strong&gt;Repeater&lt;/strong&gt; component to display all the posts as we want. However, we just choose to show only the dishes which are on sale, so we need to set a condition in the settings of this component.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Query&lt;/strong&gt; section, choose ‘&lt;strong&gt;advanced&lt;/strong&gt;’, and edit the query to add some parameters as below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HZmfiEL1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/9cUzpVF.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HZmfiEL1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/9cUzpVF.gif" alt="Add the conditions to display posts" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m9XdPkXZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/p6w5399.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m9XdPkXZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/p6w5399.png" alt="Add some parameters" width="880" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first parameter means that we’ll get posts from the post type which has the slug as ‘&lt;strong&gt;cuisine&lt;/strong&gt;’.&lt;/p&gt;

&lt;p&gt;The second one is the condition based on the ‘&lt;strong&gt;promotional_price&lt;/strong&gt;’ field. It means that if the field has any value in the field, the post will be displayed.&lt;/p&gt;

&lt;p&gt;That’s all for the condition.&lt;/p&gt;

&lt;h3&gt;Display the Posts’ Information&lt;/h3&gt;

&lt;p&gt;Let’s add some other components inside the &lt;strong&gt;Repeater&lt;/strong&gt; to display the information of the posts.&lt;/p&gt;

&lt;p&gt;Add an &lt;strong&gt;Image&lt;/strong&gt; component to get the image of the dishes which is the featured image of the post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ui8uHRi1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/pbtK1vG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ui8uHRi1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/pbtK1vG.png" alt="Add an Image component" width="880" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the &lt;strong&gt;Select Dynamic Data&lt;/strong&gt; button as below picture, and choose the &lt;strong&gt;Featured Image&lt;/strong&gt; option from the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6SY5aZVR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/egje5AP.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6SY5aZVR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/egje5AP.png" alt="Choose Featured Image option through select dynamic data button" width="880" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3XdSLKQ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XhJhlwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3XdSLKQ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XhJhlwt.png" alt="Choose the featured image from the list" width="880" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you’ll see all the featured images of the posts displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gE1zJqDF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/indFyKZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gE1zJqDF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/indFyKZ.png" alt="All the featured images of the posts displayed" width="880" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get the names of the dishes from the post title, add a &lt;strong&gt;Heading&lt;/strong&gt; component &amp;gt; &lt;strong&gt;Insert Data&lt;/strong&gt; button &amp;gt; choose &lt;strong&gt;Title&lt;/strong&gt; in the &lt;strong&gt;Post&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kt2TMxpD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/j2SBt4I.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kt2TMxpD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/j2SBt4I.gif" alt="Add a Heading component" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the original price of the dish, use the &lt;strong&gt;Text&lt;/strong&gt; component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lgVu9_uc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Pd0x993.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lgVu9_uc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Pd0x993.png" alt="Use the Text component" width="880" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose &lt;strong&gt;Insert Data&lt;/strong&gt; to get the data that saves in the custom fields. Since the field is created by Meta Box, select the &lt;strong&gt;Meta Box Field&lt;/strong&gt; option and choose the corresponding field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PygS-CuQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/Ql3Y4xM.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PygS-CuQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/Ql3Y4xM.gif" alt="Choose the right field" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll see the original price of the dishes displayed immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p0Dc8NL6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/vvRDpbY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p0Dc8NL6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/vvRDpbY.png" alt="The original price will be displayed" width="880" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the promotional price, do likewise. Or you can duplicate the &lt;strong&gt;Text&lt;/strong&gt; component used for the original price and just change the field connecting with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wJzrwl3S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Q0KL7B9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wJzrwl3S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Q0KL7B9.png" alt="Do likewise with the original price field" width="880" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the description of the dish which is the post content, add a &lt;strong&gt;Text&lt;/strong&gt; component as well. Then insert data from the &lt;strong&gt;Content&lt;/strong&gt; fields of the post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6ZQNm5bW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/wpW43Vx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6ZQNm5bW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/wpW43Vx.png" alt="Add a Text component for the description" width="880" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--03vSN9oe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DNTVUUj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--03vSN9oe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DNTVUUj.png" alt="Choose the right field" width="880" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, all the information has been obtained and displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SzP4DGQF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/VstwqMs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SzP4DGQF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/VstwqMs.png" alt="All the information is obtained" width="880" height="638"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Page&lt;/h2&gt;

&lt;p&gt;For styling, still in the page editor with &lt;strong&gt;Oxygen&lt;/strong&gt;, you can style each component by changing their settings in the &lt;strong&gt;Advanced&lt;/strong&gt; tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LaANs4Ws--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/O9Lpzc0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LaANs4Ws--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/O9Lpzc0.png" alt="Style the page" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you will see a new look of the page on the frontend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y-L6KstC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/MHBfXXi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y-L6KstC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/MHBfXXi.png" alt="The final look" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;We’ve found out how to &lt;strong&gt;show posts with specific criteria&lt;/strong&gt; using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Oxygen&lt;/strong&gt;. In the event that you use other page builders, refer more here. Or if you want to suggest any tutorials, feel free to leave a comment and keep track of our blog. Good luck!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dynamicadata</category>
      <category>customfields</category>
      <category>oxygen</category>
    </item>
    <item>
      <title>How to Create a Recipe - P6 - Using Meta Box and Brizy</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 14 Mar 2023 02:37:33 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-create-a-recipe-p6-using-meta-box-and-brizy-2ag</link>
      <guid>https://dev.to/wpmetabox/how-to-create-a-recipe-p6-using-meta-box-and-brizy-2ag</guid>
      <description>&lt;p&gt;In the prior posts of &lt;a href="https://metabox.io/series/recipe/"&gt;this series&lt;/a&gt;, we’ve known how to &lt;strong&gt;create a Recipe page&lt;/strong&gt; using some of the page builders. In today's practice, we’ll use another one named &lt;strong&gt;Brizy&lt;/strong&gt; to do it with the help of &lt;strong&gt;Meta Box&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--89HXi5B1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/f1XeFRO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--89HXi5B1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/f1XeFRO.png" alt="The example of created recipe" width="880" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/wCKxZEQ4uRE"&gt;https://youtu.be/wCKxZEQ4uRE&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;Each recipe is saved in a post of a custom post type and displayed in a single page. Besides some default fields that may help to save some basic information. You may want to have more space for the extra ones. So, we need custom fields for them.&lt;/p&gt;

&lt;p&gt;To get started, we need the &lt;a href="https://wordpress.org/plugins/meta-box/"&gt;Meta Box core plugin&lt;/a&gt; to have the framework for creating custom post types and custom fields. It’s free and you can download it directly from &lt;a href="https://wordpress.org/plugins/meta-box/"&gt;wordpress.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the advanced features from Meta Box, we need some of its extensions:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/"&gt;MB Custom Post Types &amp;amp; Custom Taxonomies&lt;/a&gt;: to create custom post types and custom taxonomies;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://www.brizy.io/"&gt;Brizy&lt;/a&gt; (Brizy Pro version): to build the pager.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create a Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; Add New&lt;/strong&gt; to create a new post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LdOdK48Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/bkU2AVR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LdOdK48Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/bkU2AVR.png" alt="Create a custom post type" width="880" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After publishing, we’ll have a menu named &lt;strong&gt;Recipe&lt;/strong&gt; in the &lt;strong&gt;Admin Dashboard&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7rAT6SNp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/TJDJRAH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7rAT6SNp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/TJDJRAH.png" alt="Created post type appears in the Admin Dashboard" width="880" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s create custom fields in the next step.&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt; to create fields. These are the fields that I created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4O9zrr7H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NExew0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4O9zrr7H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NExew0x.png" alt="Created fields" width="880" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pay attention to a special field for the video. Since &lt;strong&gt;Brizy&lt;/strong&gt; supports displaying the video preview from the link saved in the type of text. So, instead of using the &lt;strong&gt;URL&lt;/strong&gt; field or the &lt;strong&gt;oEmbed&lt;/strong&gt; to save the video link as other tutorials, I’ll use the &lt;strong&gt;Text&lt;/strong&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5a7zTvF---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/MxWOuhb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5a7zTvF---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/MxWOuhb.png" alt="Use Text field to save the link of video" width="880" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab, choose &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post Type&lt;/strong&gt; and then select &lt;strong&gt;Recipe&lt;/strong&gt; to apply these fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Md-3xeQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/QrBZDjK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Md-3xeQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/QrBZDjK.png" alt="Set location for the created fields" width="880" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you can easily see all the created custom fields in the post editor. Just fill in the recipe’s details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wmC4l2Pe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/auwABHx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wmC4l2Pe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/auwABHx.png" alt="Created fields display in the post editor" width="880" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create the Page&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Brizy &amp;gt; Templates&lt;/strong&gt; to create a new template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p2F0ji1C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/gFHul7c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p2F0ji1C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/gFHul7c.png" alt="Create the Page" width="880" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember to set the condition to set this template for the single post/page of the Recipe.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uiZZBn4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/WqXrE6r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiZZBn4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/WqXrE6r.png" alt="Set the condition for the page" width="880" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, go to the &lt;strong&gt;Global Blocks&lt;/strong&gt; to set the header for the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WzKdy6MH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/mRv2sII.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WzKdy6MH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/mRv2sII.png" alt="Set the header for the page" width="880" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To display the name of the recipe, add a &lt;strong&gt;Title&lt;/strong&gt; element. It’ll automatically get the data from the post title.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pYcaWVMl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Gcw0QQo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pYcaWVMl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Gcw0QQo.png" alt="Add a title element" width="880" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the first section, I divided information into two columns. One column is for the image of the recipe and the other is for the timing information. So, add a &lt;strong&gt;Column&lt;/strong&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZG_I8u5S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7POiMkt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZG_I8u5S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7POiMkt.png" alt="Add a Column element" width="880" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Drag the &lt;strong&gt;Featured Image&lt;/strong&gt; element to the first column. The image will be displayed immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8EwwoG9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ZFhVSYX.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8EwwoG9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ZFhVSYX.png" alt="Drag the Featured Image element to the first column" width="880" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I’ll add &lt;strong&gt;Row&lt;/strong&gt; inside the second column. Each row will be used for each type of timing information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lru4jVHu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/sKxGm8I.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lru4jVHu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/sKxGm8I.png" alt="Add Row inside the second column" width="880" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the row, add a &lt;strong&gt;Text&lt;/strong&gt; element, then choose &lt;strong&gt;Typography&lt;/strong&gt; to customize the text. You will see a small icon button to choose more options from a dropdown list for the text.&lt;/p&gt;

&lt;p&gt;The first one is to add a custom text that you can type any text as you want into the element. All the rest ones on the list are the names of custom fields. Since we save the data about the time in custom fields, choose the corresponding ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nPi8Jw82--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/A9hUdcZ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nPi8Jw82--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/A9hUdcZ.gif" alt="Choose Typography element" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To compare the type of time, add another &lt;strong&gt;Text&lt;/strong&gt; element. Set it as &lt;strong&gt;Custom Text&lt;/strong&gt; to change the text into the type of time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--96_w9NwU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/Z5S2yQW.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--96_w9NwU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/Z5S2yQW.gif" alt="Add another Text element" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For other information about the time, do likewise.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QacV7yxc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/i0b7XC8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QacV7yxc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/i0b7XC8.png" alt="Do likewise with other information" width="880" height="654"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s get the &lt;strong&gt;Ingredient&lt;/strong&gt; section. Add a &lt;strong&gt;Text&lt;/strong&gt; element and set it as a heading. Then, type the name of the section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9-ajU-08--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/3Pk7CNl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9-ajU-08--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/3Pk7CNl.png" alt="Add a text element and set it as a heading" width="880" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To display the information about the ingredients that is stored in custom fields, add another &lt;strong&gt;Text&lt;/strong&gt; element below the heading and also connect it to a custom field. The content will be displayed immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZVLmjwiR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/uD14rHX.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZVLmjwiR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/uD14rHX.gif" alt="Add another Text element" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For other sections, just do the same.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Video&lt;/strong&gt; section, instead of adding &lt;strong&gt;Text&lt;/strong&gt;, add a &lt;strong&gt;Video&lt;/strong&gt; element. A default video will be displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KIqAEcC9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/bVgDpg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KIqAEcC9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/bVgDpg5.png" alt="Add a Video element for the Video section" width="880" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To display the video about the recipe, click to the preview button. Beside the pre-set link, there is also the icon to connect with custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZB9u0Gf2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/N1XCATf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZB9u0Gf2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/N1XCATf.png" alt="Click the preview button" width="880" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’ve done getting all the information about the recipe. Add a new block and then go to the Global Blocks section once again to add the footer for the page.&lt;/p&gt;

&lt;p&gt;This is how it displays on the frontend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--efigtMZA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/VdhHvbY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--efigtMZA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/VdhHvbY.png" alt="All the information has been obtained" width="880" height="682"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Page&lt;/h2&gt;

&lt;p&gt;Back to the template editor of &lt;strong&gt;Brizy&lt;/strong&gt;, you can change the column width as well as the settings of each element to have the style as you want. Just customize one by one, then you will see the new look of the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GcAZg8Y5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/c0A39P2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GcAZg8Y5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/c0A39P2.png" alt="Change the column width" width="880" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the result that I want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--89HXi5B1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/f1XeFRO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--89HXi5B1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/f1XeFRO.png" alt="The final result" width="880" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;We've found out how to create a Recipe page using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Brizy&lt;/strong&gt;. More information is available here if you use other page builders. Keep an eye on our site for more insightful tutorials and feel free to suggest any ideas for us. Good luck!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>customfields</category>
      <category>dynamicdata</category>
      <category>brizy</category>
    </item>
    <item>
      <title>How to Display Opening Hours for Restaurants - P2 - Using Meta Box and Oxygen</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 28 Feb 2023 02:19:40 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-display-opening-hours-for-restaurants-p2-using-meta-box-and-oxygen-19e1</link>
      <guid>https://dev.to/wpmetabox/how-to-display-opening-hours-for-restaurants-p2-using-meta-box-and-oxygen-19e1</guid>
      <description>&lt;p&gt;In a website for booking restaurants, there will be a lot of different restaurants. Definitely, each restaurant has its own opening hours and you may want to create a section for the opening time for each one. So, in this next part of the series, we’re going to figure out &lt;strong&gt;how to add an opening hours section into the singular page&lt;/strong&gt; by &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Oxygen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This section will be the same as the last ones we created in the &lt;a href="https://metabox.io/display-restaurant-opening-hours-p1-meta-box-gutenberg/"&gt;previous post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tZX3kJ_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NjSFCse.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tZX3kJ_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NjSFCse.png" alt="Example of opening hours section" width="880" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;In this case, I want to put the opening hours section for a particular restaurant. And each restaurant including its own information will be displayed on a singular page. So, all the detailed information about the restaurants’ working time will be saved in custom fields stored in the post containing the restaurants’ information.&lt;/p&gt;

&lt;p&gt;We’ll display some extra information such as time slots for each day, and we'll use custom fields. So, we need &lt;a href="https://metabox.io/"&gt;Meta Box plugin&lt;/a&gt; to have a framework to create them. It’s free on &lt;a href="https://wordpress.org/plugins/meta-box/"&gt;wordpress.org&lt;/a&gt;. We also need additional Meta Box advanced features, which are accessible in the following extensions:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: this premium extension of Meta Box provides an intuitive UI in the back end to create and configure custom fields without using code;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-group/"&gt;Meta Box Group&lt;/a&gt;: this extension helps to arrange fields into groups;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-conditional-logic/"&gt;Meta Box Conditional Logic&lt;/a&gt;: this premium extension allows you to create rules to control the display of the fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, &lt;a href="https://oxygenbuilder.com/"&gt;Oxygen Builder&lt;/a&gt;. Remember to use the 3.9 version or upper to have the native integration with Meta Box.&lt;/p&gt;

&lt;h2&gt;Create a Custom Post Type&lt;/h2&gt;

&lt;p&gt;If you read the &lt;a href="https://metabox.io/display-restaurant-opening-hours-p1-meta-box-gutenberg/"&gt;previous post&lt;/a&gt; in this series, you can skip this step. In the event that you haven’t had a post type yet, just create a new one as usual.&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FogaRimM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Axbn3XD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FogaRimM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Axbn3XD.png" alt="Create a custom post type" width="880" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;This step is the same as what I showed in the &lt;a href="https://metabox.io/display-restaurant-opening-hours-p1-meta-box-gutenberg/"&gt;previous post&lt;/a&gt; about displaying opening hours.&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields &amp;gt; Add New&lt;/strong&gt; to create a new field group. Then, add custom fields with the structure like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/th&gt;
&lt;th&gt;&lt;b&gt;ID&lt;/b&gt;&lt;/th&gt;
&lt;th&gt;&lt;b&gt;Type&lt;/b&gt;&lt;/th&gt;
&lt;th&gt;&lt;b&gt;Options&lt;/b&gt;&lt;/th&gt;
&lt;th&gt;&lt;b&gt;Condition&lt;/b&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Choose an option&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;choose_an_option&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;select&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;1. all_days_are_the_same&lt;/span&gt;

&lt;span&gt;2. difference_between_weekdays_and_weekend&lt;/span&gt;

&lt;span&gt;3. custom&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;All days have the same opening hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;all_days_have_the_same_opening_hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when:&lt;/span&gt;

&lt;span&gt;the &lt;/span&gt;&lt;span&gt;choose_an_option&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;all_days_are_the_same&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Type of opening hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;type_of_opening_hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;select&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;1. open_all_day&lt;/span&gt;

&lt;span&gt;2. close_all_day&lt;/span&gt;

&lt;span&gt;3. by_appointment_only&lt;/span&gt;

&lt;span&gt;4. enter_hours&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Choose time slots&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;choose_time_slots&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;type_of_opening_hours&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;enter_hours&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Start time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;start_time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;End time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;end_time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Weekdays&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;weekdays&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;choose_an_opton&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;difference_between_weekdays_and_weekend&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Type of opening hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;type_of_opening_hours&lt;/span&gt;&lt;b&gt;_weekdays&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;select&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;1. open_all_day&lt;/span&gt;

&lt;span&gt;2. close_all_day&lt;/span&gt;

&lt;span&gt;3. by_appointment_only&lt;/span&gt;

&lt;span&gt;4. enter_hours&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Choose time slots&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;choose_time_slots&lt;/span&gt;&lt;b&gt;_weekdays&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;type_of_opening_hours_weekdays&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;enter_hours&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Start time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;start_time&lt;/span&gt;&lt;b&gt;_weekdays&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;End time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;end_time&lt;/span&gt;&lt;b&gt;_weekdays&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Weekend&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;weekend&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;choose_an_opton&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;difference_between_weekdays_and_weekend&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Type of opening hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;type_of_opening_hours&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;select&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;1. open_all_day&lt;/span&gt;

&lt;span&gt;2. close_all_day&lt;/span&gt;

&lt;span&gt;3. by_appointment_only&lt;/span&gt;

&lt;span&gt;4. enter_hours&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Choose time slots&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;choose_time_slots&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;type_of_opening_hours_weekend&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;enter_hours&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Start time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;start_time&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;End time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;end_time&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Monday&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;monday&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;choose_an_option&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;custom&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Type of opening hours&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;type_of_opening_hours&lt;/span&gt;&lt;b&gt;_monday&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;select&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;1. open_all_day&lt;/span&gt;

&lt;span&gt;2. close_all_day&lt;/span&gt;

&lt;span&gt;3. by_appointment_only&lt;/span&gt;

&lt;span&gt;4. enter_hours&lt;/span&gt;
&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Choose time slots&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;choose_time_slots&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;display only when: the &lt;/span&gt;&lt;span&gt;type_of_opening_hours_monday&lt;/span&gt;&lt;span&gt; field = the &lt;/span&gt;&lt;span&gt;enter_hours&lt;/span&gt;&lt;span&gt; option&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Start time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;start_time&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;End time&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;span&gt;end_time&lt;/span&gt;&lt;b&gt;_weekend&lt;/b&gt;
&lt;/td&gt;
&lt;td&gt;&lt;span&gt;time picker&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Sunday&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;…&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As you saw in the table above, the first field is a &lt;strong&gt;Select&lt;/strong&gt; field and there are 3 options that I filled in the &lt;strong&gt;Choice&lt;/strong&gt; box as below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ruDH1yGP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/cQKTi1W.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ruDH1yGP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/cQKTi1W.png" alt="Fill the information in the Choice box" width="880" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These 3 options will be used to set the display rule of other group fields.&lt;/p&gt;

&lt;p&gt;To set conditions to groups, for example, with the &lt;strong&gt;All days have the same opening hours&lt;/strong&gt; group. Go to the &lt;strong&gt;Advanced&lt;/strong&gt; tab, and then set the rule in the &lt;strong&gt;Conditional Logic&lt;/strong&gt; section like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HfIH-TV6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/LFwZofk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HfIH-TV6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/LFwZofk.png" alt="Set the rule in the Conditional Logic" width="880" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This rule means this group will be displayed when the &lt;strong&gt;Choose an Option&lt;/strong&gt; field is selected as &lt;strong&gt;All days have the same opening hours&lt;/strong&gt; option which has the value is &lt;strong&gt;all_days_are_the_same&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Similarly, if the &lt;strong&gt;Choose an Option&lt;/strong&gt; field is chosen as the &lt;strong&gt;Difference between weekdays and weekend&lt;/strong&gt; option, all the subfields of the &lt;strong&gt;Weekdays&lt;/strong&gt; and &lt;strong&gt;Weekend&lt;/strong&gt; group will be displayed. Or if the &lt;strong&gt;Choose an Option&lt;/strong&gt; field is selected as the &lt;strong&gt;Custom&lt;/strong&gt; option, the group fields for every day in a week will be shown up. That’s the concept of how to create fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kroJTgao--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/giCpWKz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kroJTgao--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/giCpWKz.png" alt="Concept of how to create fields" width="880" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Oqv6AYLC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jnj7F10.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Oqv6AYLC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jnj7F10.png" alt="All the subfields of the Weekdays and Weekend group will be displayed" width="880" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In each group field, I also have subfields with the same structure.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Type of Opening Hours&lt;/strong&gt; field is select field. I have 4 options in the &lt;strong&gt;Choice&lt;/strong&gt; box:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Open All day;&lt;/li&gt;
    &lt;li&gt;Close All day;&lt;/li&gt;
    &lt;li&gt;By Appointment Only;&lt;/li&gt;
    &lt;li&gt;Enter Hours.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BUwWD0k4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/qxDVyAH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BUwWD0k4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/qxDVyAH.png" alt="Fill in the information in the Choice box" width="880" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second subfield is a Group field named Choose Time Slots. Inside it, there are two subfields: &lt;strong&gt;Start Time&lt;/strong&gt; and &lt;strong&gt;End Time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If the restaurant has multiple opening hours, you can choose &lt;strong&gt;Enter Hours&lt;/strong&gt; to display the &lt;strong&gt;Start Time&lt;/strong&gt; and &lt;strong&gt;End Time&lt;/strong&gt; field in the &lt;strong&gt;Choose Time Slots&lt;/strong&gt; group. So, I will set the rule for this group like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YXIS7oFP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XmK1LWE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YXIS7oFP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XmK1LWE.png" alt="Set the rule for the group field" width="880" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In case the restaurant opens in multiple time slots, we’ll need this group to be cloneable. So, I tick this box as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pDh7tehY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/9JYVLp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pDh7tehY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/9JYVLp9.png" alt="Set the group to be cloneable" width="880" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the fields, go to the &lt;strong&gt;Settings&lt;/strong&gt; tab of the field group, choose &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post Type&lt;/strong&gt;, and select &lt;strong&gt;Restaurant&lt;/strong&gt; to apply these fields to this post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zGSqFLyC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jpmKrvm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zGSqFLyC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jpmKrvm.png" alt="Set Location for the created fields" width="880" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Publish this field group and go to the post editor in &lt;strong&gt;Restaurant&lt;/strong&gt;, you will see the custom fields here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--isxqQIpF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/E9vxsR5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--isxqQIpF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/E9vxsR5.gif" alt="The created fields appear in the Post editor" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They work exactly like the rule we set.&lt;/p&gt;

&lt;h2&gt;Display the Fields’ Value&lt;/h2&gt;

&lt;p&gt;We’ll display the opening hours section using Oxygen. If you’ve had a template created by Oxygen for the Restaurant singular page, just go and edit it.&lt;/p&gt;

&lt;p&gt;In the event you haven't had one, go to &lt;strong&gt;Oxygen &amp;gt; Template &amp;gt; Add New Template&lt;/strong&gt; to create a new one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Ym9a5pI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ESq9hMo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Ym9a5pI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ESq9hMo.png" alt="Create a new template" width="880" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, I’ve already had it. So, I just click &lt;strong&gt;Edit with Oxygen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Next, add a new &lt;strong&gt;Div&lt;/strong&gt; component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L10mBJA5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/dZSFZnz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L10mBJA5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/dZSFZnz.png" alt="Add a new Div component" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this practice, it includes some complex conditions to choose which fields will be got the value from. However, Oxygen hasn’t supported logic to choose which field yet, we need to use code in this practice. So, I will add a &lt;strong&gt;Code Block&lt;/strong&gt; component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dHSPfR9m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/okuDlLE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dHSPfR9m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/okuDlLE.png" alt="Add a Code Block component" width="880" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, choose the &lt;strong&gt;PHP&amp;amp;HTML&lt;/strong&gt; and you will see a space to add code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iBlqE80g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7JpbFqf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iBlqE80g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7JpbFqf.png" alt="Choose the PHP&amp;amp;HTML" width="880" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GHIyX1HD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XQMZTC7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GHIyX1HD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XQMZTC7.png" alt="There will be a space to add code" width="880" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code is quite long, so I put it in my Github &lt;a href="https://github.com/wpmetabox/tutorials/blob/master/display-opening-hours-with-Oxygen/template.php"&gt;here&lt;/a&gt;. You can refer to it for more details. The code is divided into several parts to get corresponding group data. Because of the same concept in all parts, I’ll explain a typical part to be more clear about the logic.&lt;/p&gt;

&lt;pre&gt;&amp;lt;?php $options = rwmb_meta( 'choose_an_option' ); ?&amp;gt;
&amp;lt;?php if ( $options == "all_days_are_the_same" ): ?&amp;gt;
    &amp;lt;?php $same_days = rwmb_meta( 'all_days_have_the_same_opening_hours' ); ?&amp;gt;
        &amp;lt;?php $same_days_option = $same_days['type_of_opening_hours']; ?&amp;gt;
        &amp;lt;?php $choose_time_slots = $same_days['choose_time_slots'] ?&amp;gt;
        &amp;lt;?php if ( $same_days_option == "enter_hours" ): ?&amp;gt;
            &amp;lt;?php foreach ( $choose_time_slots as $time_slots ): ?&amp;gt;
                &amp;lt;?php echo $time_slots['start_time'] ?&amp;gt;
                &amp;lt;?php echo $time_slots['end_time'] ?&amp;gt;
            &amp;lt;?php endforeach; ?&amp;gt;
        &amp;lt;?php else: ?&amp;gt;
            &amp;lt;?php 
            $select_field = isset( $same_days['type_of_opening_hours'] ) ? $same_days['type_of_opening_hours'] : '';
            $group_field = rwmb_get_field_settings( 'all_days_have_the_same_opening_hours' );
            foreach ( $group_field['fields'] as $field ) {
                if ( empty( $field['options'] ) ) {
                    continue;
                }
            ?&amp;gt;
            &amp;lt;?php if($field['options'][$select_field]): ?&amp;gt;
                &amp;lt;?= $field['options'][$select_field]; ?&amp;gt;
            &amp;lt;?php endif; ?&amp;gt;
            &amp;lt;?php &lt;span&gt;} &lt;/span&gt;&lt;span&gt;?&amp;gt;
        &amp;lt;?php endif; ?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
Let’s get through each line with me.
&lt;pre&gt;&amp;lt;?php $options = rwmb_meta( 'choose_an_option' ); ?&amp;gt;&lt;/pre&gt;
I created a variable to get the value of the field &lt;strong&gt;Choose an Option&lt;/strong&gt; which has the &lt;strong&gt;ID&lt;/strong&gt; is &lt;em&gt;choose_an_option&lt;/em&gt;. We will create a condition based on the returned value to decide which fields will be got the value from.
&lt;pre&gt;&amp;lt;?php if ( $options == "all_days_are_the_same" ): ?&amp;gt;
&amp;lt;?php $same_days = rwmb_meta( 'all_days_have_the_same_opening_hours' ); ?&amp;gt;&lt;/pre&gt;
If the returned value is the first option, we will get the value of &lt;strong&gt;All days have the same opening hours&lt;/strong&gt; group.
&lt;pre&gt;&amp;lt;?php $same_days_option = $same_days['type_of_opening_hours']; ?&amp;gt;
&amp;lt;?php $choose_time_slots = $same_days['choose_time_slots'] ?&amp;gt;&lt;/pre&gt;
I also have 2 following variables that obtain the value of two fields: &lt;strong&gt;Type of Opening Hour&lt;/strong&gt; and &lt;strong&gt;Choose Time Slots&lt;/strong&gt;. They are the subfields of the &lt;strong&gt;All days have the same opening hours&lt;/strong&gt; group.

Since the &lt;strong&gt;Type of Opening Hour&lt;/strong&gt; is a &lt;strong&gt;Select&lt;/strong&gt; field with some options as the image below, based on the returned value of this field, we’ll get value from the &lt;strong&gt;Choose Time Slots&lt;/strong&gt; group or not.
&lt;pre&gt;&amp;lt;?php if ( $same_days_option == "enter_hours" ): ?&amp;gt;
    &amp;lt;?php foreach ( $choose_time_slots as $time_slots ): ?&amp;gt;
        &amp;lt;?php echo $time_slots['start_time'] ?&amp;gt;
        &amp;lt;?php echo $time_slots['end_time'] ?&amp;gt;
    &amp;lt;?php endforeach; ?&amp;gt;&lt;/pre&gt;
If the returned value of the &lt;strong&gt;Type of Opening Hour&lt;/strong&gt; field is &lt;strong&gt;Enter hours&lt;/strong&gt;, we’ll display the value from the &lt;strong&gt;Choose Time Slots&lt;/strong&gt; group field with its subfields: &lt;strong&gt;Start Time&lt;/strong&gt; and &lt;strong&gt;End Time&lt;/strong&gt; fields. Since the &lt;strong&gt;Choose Time Slots&lt;/strong&gt; group is cloneable, we have a loop here.
&lt;pre&gt;&amp;lt;?php 
$select_field = isset( $same_days['type_of_opening_hours'] ) ? $same_days['type_of_opening_hours'] : '';
$group_field = rwmb_get_field_settings( 'all_days_have_the_same_opening_hours' );
    foreach ( $group_field['fields'] as $field ) {
        if ( empty( $field['options'] ) ) {
            continue;
        }
?&amp;gt;
    &amp;lt;?php if($field['options'][$select_field]): ?&amp;gt;
        &amp;lt;?= $field['options'][$select_field]; ?&amp;gt;
    &amp;lt;?php endif; ?&amp;gt;
&amp;lt;?php } ?&amp;gt;&lt;/pre&gt;
For other options in the &lt;strong&gt;Type of opening hours&lt;/strong&gt; field, the above is used to display the label of that selected option.

That's the end of the first section, corresponding to the first option of the &lt;strong&gt;Choose an Option&lt;/strong&gt; field.

If separate days have different opening hours, call the values from the remaining groups.
The structure of those groups is the same as the &lt;strong&gt;All days have the same opening hours&lt;/strong&gt; group, so just simply follow the same logic in the code.

This section on the page is now displayed like this because this code is for getting data from custom fields only.

&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hMKQ_WpI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Ky5uvnC.png" alt="The section of the page will displayed like this" width="880" height="647"&gt;

To have the display with some other texts as the demo, I’ll add some heading, div tags and class for easier styling later. I’ve uploaded the code on &lt;a href="https://github.com/wpmetabox/tutorials/blob/master/display-opening-hours-with-Oxygen/template.php"&gt;Github&lt;/a&gt;, you can refer to it.

Now, all the time slots with some additional texts are shown in the section already.

&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6VppHupt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/GAkDggx.png" alt="All the time slots with some additional texts are shown" width="880" height="666"&gt;

However, it doesn’t look as beautiful as I want. So, I will add some CSS to style this section in the next step.
&lt;h2&gt;Style the Section&lt;/h2&gt;
For styling, you can go back to the Oxygen visual builder and style each component if any.
In this case, I‘ll add some CSS by going to &lt;strong&gt;Manage &amp;gt; Stylesheet&lt;/strong&gt; and &lt;strong&gt;Add Stylesheet&lt;/strong&gt;.

&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6I56ju3x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/0y9yroz.gif" alt="Style the Section" width="880" height="494"&gt;
This is the CSS that I’ve used:
&lt;pre&gt;.container.detail-restaurant .opening-hours {
max-width: 300px;
margin: 0 auto;
width: 100%;
}

.container.detail-restaurant .opening-hours h2 {
margin: 0 0 10px;
text-align: center;
border: 4px solid rgba(231,57,72,.85);
border-right: 0;
border-left: 0;
}

.container.detail-restaurant .detail-schedule .date-time {
display: flex;
width: 100%;
justify-content: space-between;
flex-wrap: wrap;
align-items: baseline;
}

.container.detail-restaurant .detail-schedule .date-time .hour .starting-hour:after{
content: '-';
margin: 0 5px;
}

.container.detail-restaurant .detail-schedule .date-time .hour .time-slot {
display: flex;
}

.container.detail-restaurant .detail-schedule .date-time .date {
font-weight: 700;
font-size: 15px;
}

.container.detail-restaurant .detail-schedule {
display: flex;
flex-wrap: wrap;
justify-content: center;
border-bottom: 4px solid rgba(231,57,72,.85);
padding-bottom: 10px;
}

&lt;/pre&gt;

&lt;p&gt;Let’s see how the opening hour section displays on the frontend. It’s much more beautiful, isn't it?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tZX3kJ_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NjSFCse.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tZX3kJ_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/NjSFCse.png" alt="The final result" width="880" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To refer to all the code that I used, you can visit here.&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;We’ve gone through all the procedures to display the Opening Hours section using Meta Box plugin and Oxygen Builder. Try it out and let us know how it goes in the comment section. If you have projects using Meta Box and Gutenberg, refer to our &lt;a href="https://metabox.io/display-restaurant-opening-hours-p1-meta-box-gutenberg/"&gt;prior post&lt;/a&gt; in this series. Or if you have any tutorial suggestions, feel free to leave a comment. Thank you for reading. Best of luck!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>customfield</category>
      <category>dynamicdata</category>
      <category>oxygen</category>
    </item>
    <item>
      <title>How to Show Posts with Specific Criteria - P1 - Using Meta Box and Bricks</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 21 Feb 2023 02:06:04 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-show-posts-with-specific-criteria-p1-using-meta-box-and-bricks-1j6b</link>
      <guid>https://dev.to/wpmetabox/how-to-show-posts-with-specific-criteria-p1-using-meta-box-and-bricks-1j6b</guid>
      <description>&lt;p&gt;In sale seasons, you may want to create an archive page to display only the products which are on sale, then this series is for you. In this practice, we’re going to &lt;strong&gt;show posts with specific criteria&lt;/strong&gt;, in this case, it’s the products that are on sale.&lt;/p&gt;

&lt;p&gt;I’ll create a page using Bricks to show them like this with an example of dishes for the products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjixQXCm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjixQXCm.png" alt="Example of showing the posts with criteria" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/fGm74bVzbkg" rel="noopener noreferrer"&gt;https://youtu.be/fGm74bVzbkg&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;Each dish is a post of a custom post type and there may be some extra information you want to save in custom fields for them. In this case, I have two fields in order to save the original price and the promotional price. All the dishes which have the promotional price, which means that it’s on sale, will be displayed on the page.&lt;/p&gt;

&lt;p&gt;In this practice, we need these tools:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/" rel="noopener noreferrer"&gt;Meta Box core plugin&lt;/a&gt;: to have a framework to create custom post types and custom fields;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/" rel="noopener noreferrer"&gt;MB Custom Post Types &amp;amp; Custom Taxonomies&lt;/a&gt;: to create custom post types;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/" rel="noopener noreferrer"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Bricks Builder&lt;/strong&gt;: to create the page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create a Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; Add New&lt;/strong&gt; to create a new post type for the dishes. Here, I name it &lt;strong&gt;Cuisines&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQBR48fA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQBR48fA.png" alt="Create a custom post type" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt; to create fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fo38tqhY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fo38tqhY.png" alt="Create custom fields" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are the two fields that I’ve just created.&lt;/p&gt;

&lt;p&gt;After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post type&lt;/strong&gt; &amp;gt; select &lt;strong&gt;Cuisines&lt;/strong&gt; to apply these fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FbXWE1qR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FbXWE1qR.png" alt="Set location for the created fields" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When creating any post in the &lt;strong&gt;Cuisines&lt;/strong&gt; post type, you’ll see all created custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FoXohkMV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FoXohkMV.png" alt="New post in the Cuisines post type in the Post Editor" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create the Page&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Pages &amp;gt; Add New&lt;/strong&gt; to create a new page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FHilxJ2n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FHilxJ2n.png" alt="Create the Page" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, let’s edit it with Bricks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fwf4EwEW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fwf4EwEW.png" alt="Edit with Bricks" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, add a new &lt;strong&gt;Section&lt;/strong&gt; element to contain all the dishes’ information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F5VJ7C5V.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F5VJ7C5V.png" alt="Add a Section element" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, add a &lt;strong&gt;Heading&lt;/strong&gt; element to display the page’s title. Since the title of the page is the post title, choose &lt;strong&gt;Select dynamic data&lt;/strong&gt; &lt;strong&gt;&amp;gt; Post title&lt;/strong&gt; to get the page’s name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FATbL9s5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FATbL9s5.png" alt="Add a Heading element" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we’re going to get the dishes. However, we just want to display only the dishes that are on sale. So, we need to set conditions for them. Let’s see how to do it.&lt;/p&gt;

&lt;h3&gt;Set the Condition&lt;/h3&gt;

&lt;p&gt;Inside the &lt;strong&gt;Container&lt;/strong&gt;, add a &lt;strong&gt;Div&lt;/strong&gt; element to cover all of the post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBOoOM7B.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBOoOM7B.png" alt="Add a Div element to cover all of the post" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since each dish is a post of a custom post type, switch the button to enable the &lt;strong&gt;Use the query loop&lt;/strong&gt; option and set the query. Choose &lt;strong&gt;Post&lt;/strong&gt; and &lt;strong&gt;Cuisines&lt;/strong&gt; to get the data from posts of that post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmHOxKt6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmHOxKt6.png" alt="Enable the Use the query loop and set the query " width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because we just want to display only the posts that are on sale, which means the &lt;strong&gt;Promotional Price&lt;/strong&gt; field of those posts must have a value.&lt;/p&gt;

&lt;p&gt;So, scroll down to the &lt;strong&gt;Meta Query&lt;/strong&gt; section. Based on the value of the &lt;strong&gt;Promotional Price&lt;/strong&gt; fields, we can clarify which dishes to display. Therefore, in the &lt;strong&gt;Meta Key&lt;/strong&gt;, fill in the &lt;strong&gt;ID&lt;/strong&gt; of the &lt;strong&gt;Promotional Price&lt;/strong&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FR5dvmSu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FR5dvmSu.png" alt="Fill in the ID of promotional price field in the Meta Key" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then in the &lt;strong&gt;Compare&lt;/strong&gt;, choose &lt;strong&gt;Not equal&lt;/strong&gt;. So, all the posts having value in the &lt;strong&gt;Promotional&lt;/strong&gt; &lt;strong&gt;Price&lt;/strong&gt; fields will be chosen to display.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FWFNVyAs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FWFNVyAs.png" alt="Choose Not equal in the Compare" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s all for the condition. Next, we’ll display the information you want for each post.&lt;/p&gt;

&lt;h3&gt;Display the Cuisines Information&lt;/h3&gt;

&lt;p&gt;To display the image of the dishes, add the &lt;strong&gt;Image&lt;/strong&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FrTODJjS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FrTODJjS.png" alt="Add an Image element" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since these images are the featured image of the post, choose the &lt;strong&gt;Select dynamic data&lt;/strong&gt; button and find the &lt;strong&gt;Featured Image&lt;/strong&gt; option in the &lt;strong&gt;Post&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F2YeLnqT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F2YeLnqT.png" alt="Choose Featured Image to get the image of the dish" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, to get the name of the dish which is the post title, add a &lt;strong&gt;Heading&lt;/strong&gt; element, and choose the &lt;strong&gt;Select dynamic data&lt;/strong&gt; button, then find &lt;strong&gt;Post Title&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FHYNVBex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FHYNVBex.png" alt="Add a Heading element and choose Post title through the Select dynamic data button" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, add a &lt;strong&gt;Div&lt;/strong&gt; element.&lt;/p&gt;

&lt;p&gt;For the price of the dish, instead of adding &lt;strong&gt;Basic Text&lt;/strong&gt;, I’d like to use the &lt;strong&gt;Rich Text&lt;/strong&gt; element to get information about the price. The &lt;strong&gt;Basic Text&lt;/strong&gt; allows you to get the data from the field only, but the &lt;strong&gt;Rich Text&lt;/strong&gt; enables adding the extra text along with the data.&lt;/p&gt;

&lt;p&gt;So, to display the original price, add a &lt;strong&gt;Rich Text&lt;/strong&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FcZeHc6d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FcZeHc6d.png" alt="Add a Rich text element for the original price field" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the section of the custom fields created by &lt;strong&gt;Meta Box&lt;/strong&gt; for the &lt;strong&gt;Cuisines&lt;/strong&gt; post type. Go to &lt;strong&gt;Meta Box (Cuisines)&lt;/strong&gt; and then find the &lt;strong&gt;Original Price&lt;/strong&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FDd3dK9H.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FDd3dK9H.png" alt="Find the correct field" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the promotional price information, do likewise.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYuoGvPh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYuoGvPh.png" alt="Do likewise with promotional price field" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To display the description of the dish which is the post content, add a &lt;strong&gt;Basic text&lt;/strong&gt; and then connect it to the &lt;strong&gt;Post&lt;/strong&gt; &lt;strong&gt;content&lt;/strong&gt; fields through the &lt;strong&gt;Select dynamic data button.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVx8IYrS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVx8IYrS.png" alt="Add a Basic Text for the post content" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, all the information is shown. This is how it displays on the front end.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FL9D39sD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FL9D39sD.png" alt="All information has been obtained" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Page&lt;/h2&gt;

&lt;p&gt;Still in the page editor with &lt;strong&gt;Bricks&lt;/strong&gt;, style any element you want by changing their settings in the &lt;strong&gt;Style&lt;/strong&gt; tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FFt8whJ1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FFt8whJ1.png" alt="Style the page" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The archive page now displays beautifully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjixQXCm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjixQXCm.png" alt="The archive page displays beautifully" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;Using custom fields is a brilliant way to create a condition for displaying posts. If you see this practice is helpful, try it out and share the result with us. Or, if you have any suggestions about which tutorial we should make, feel free to leave your comment below. Thanks for reading!&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>How to Create a Team Members Page - P6 - using Meta Box and Breakdance</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 14 Feb 2023 01:55:59 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-create-a-team-members-page-p6-using-meta-box-and-breakdance-5067</link>
      <guid>https://dev.to/wpmetabox/how-to-create-a-team-members-page-p6-using-meta-box-and-breakdance-5067</guid>
      <description>&lt;p&gt;In this series - &lt;a href="https://metabox.io/series/team-members/"&gt;Creating a team members page&lt;/a&gt;, we’ve done some methods with different page builders. Today, we’ll introduce a way to do it using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Breakdance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is a sample we’ll use for this practice:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LKmO6Dkb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/goSGSGz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LKmO6Dkb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/goSGSGz.png" alt="Example of the team members page" width="880" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/r_9efMiekR0"&gt;https://youtu.be/r_9efMiekR0&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;In this case, each member will be a post in a custom post type and will be displayed in a name card as a box, like in the below image. It is created as a global block in Breakdance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PR2Phjuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/FbE73YE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PR2Phjuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/FbE73YE.png" alt="Each member will be a post in a custom post type" width="880" height="679"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the name card, the name and the avatar of the member are the title and the featured image of the post. Other information such as position, Facebook, Instagram, and Mail will be saved in different custom fields created by Meta Box.&lt;/p&gt;

&lt;p&gt;For this practice, we need some tools:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/"&gt;Meta Box core plugin&lt;/a&gt;: to have the framework for creating custom post type and custom fields.&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/"&gt;MB Custom Post Type&lt;/a&gt;: to create custom post type for the team members;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: to provide a UI in the backend to create custom fields easily;&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Breakdance&lt;/strong&gt;: to build the page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create a New Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &lt;/strong&gt;&amp;gt; &lt;strong&gt;Post Types&lt;/strong&gt;, then create a new post type for the members.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fuCbt_9g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/BgsY0i9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fuCbt_9g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/BgsY0i9.png" alt="Create a new post type" width="880" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &lt;/strong&gt;&amp;gt; &lt;strong&gt;Custom Fields &lt;/strong&gt;&amp;gt; &lt;strong&gt;Add New&lt;/strong&gt; to create a new field group.&lt;/p&gt;

&lt;p&gt;Here are the fields that I created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xfv6zj21--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/cfyYUzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xfv6zj21--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/cfyYUzq.png" alt="Create custom fields" width="880" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have &lt;a href="https://youtu.be/_DaFUt92kYY"&gt;a tutorial on how to create custom fields&lt;/a&gt;, you can refer to it for more information.&lt;/p&gt;

&lt;p&gt;For the position information, choose the &lt;strong&gt;Select&lt;/strong&gt; field that allows us to set some options to choose from.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x-vIZMsz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/qy9g8bu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x-vIZMsz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/qy9g8bu.png" alt="Choose the Select field for the position information" width="880" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For other information such as &lt;strong&gt;Facebook&lt;/strong&gt;, &lt;strong&gt;Instagram&lt;/strong&gt;, and &lt;strong&gt;Mail&lt;/strong&gt;, we set them as the &lt;strong&gt;URL&lt;/strong&gt; field to save the link for those social networks.&lt;/p&gt;

&lt;p&gt;After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; &amp;gt; choose &lt;strong&gt;Post Type&lt;/strong&gt; as the &lt;strong&gt;Team Members&lt;/strong&gt; post type to apply these fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t2W4Zcdo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/mkhjbnG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t2W4Zcdo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/mkhjbnG.png" alt="Set the location for the created fields" width="880" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, go to the post editor, you will see the created custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TqJ22kCu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/EZGDIZU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TqJ22kCu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/EZGDIZU.png" alt="Created fields appear in the Post Editor" width="880" height="718"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, just fill in the information.&lt;/p&gt;

&lt;h2&gt;Create a Global Block&lt;/h2&gt;

&lt;p&gt;Now, let’s create a global block to get and display the team member's information. Go to &lt;strong&gt;Breakdance&lt;/strong&gt; &amp;gt; &lt;strong&gt;Global Blocks&lt;/strong&gt; and create a new one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CQIDHVZz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/q4vbE3W.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CQIDHVZz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/q4vbE3W.png" alt="Create a Global Block" width="880" height="638"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember to set the preview for the global block as a post in the Team Members custom post type.&lt;/p&gt;

&lt;p&gt;My global block is to display the information of each member on a name card. First, we'll add a div for this name card.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f-KVPyqq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/uOLqALH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f-KVPyqq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/uOLqALH.png" alt="Add a Div for the name card" width="880" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, each name card has 2 columns. One is to display the avatar and social icons. Another is to display the member information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cJnRq3L9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Z4awhW7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cJnRq3L9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Z4awhW7.png" alt="Each name card has 2 columns" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To divide the content into 2 columns, I’ll add 2 new divs. Each one for each column.&lt;/p&gt;

&lt;p&gt;In the first column, add a &lt;strong&gt;Post Featured Image&lt;/strong&gt; element to have the avatar saved as the post's featured image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PrnvDFpA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/wNYiatD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PrnvDFpA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/wNYiatD.png" alt="Add a Post Featured Image element for the avatar" width="880" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we’ll create another div inside this column to contain all the social networks.&lt;/p&gt;

&lt;p&gt;Now, select an &lt;strong&gt;Icon&lt;/strong&gt; element to create the social network’s icon. Then, choose the icon's shape.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cb55AzA0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XH98BNV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cb55AzA0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XH98BNV.png" alt="Select an Icon element to create the social network's icon" width="880" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As the social links are saved in custom fields, we’ll insert the dynamic data into the &lt;strong&gt;Icon&lt;/strong&gt; element. To do it, click the icon shown in the image below and choose the right field in the &lt;strong&gt;Metabox&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UiMzwaY---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/g9wolyK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UiMzwaY---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/g9wolyK.png" alt="Insert the dynamic data into the Icon element" width="880" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take the member's Facebook profile as an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iO26XLH_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/aLmC3mH.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iO26XLH_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/aLmC3mH.gif" alt="Take the Facebook profile as an example" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the Instagram and Mail information, do likewise.&lt;/p&gt;

&lt;p&gt;Move to the second column, to get the name of the member, it’s the post title, so choose the &lt;strong&gt;Heading&lt;/strong&gt; element then insert dynamic data for this element by choosing the &lt;strong&gt;Post Title&lt;/strong&gt; option in the &lt;strong&gt;Post&lt;/strong&gt; section. You see that the member’s name has just been obtained already.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wMkwcYRz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/s3edGgq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wMkwcYRz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/s3edGgq.gif" alt="Choose the Heading element then insert dynamic data" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the position information, add a &lt;strong&gt;Text&lt;/strong&gt; element. As the position is saved in the custom field created by Meta Box, we’ll insert the dynamic data into this element. Also, click the icon as we did before and choose the corresponding field name in the &lt;strong&gt;Metabox&lt;/strong&gt; section. Then, you’ll see the member’s position appear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YF1t3VjM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/FXgXeOC.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YF1t3VjM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/FXgXeOC.gif" alt="Add a Text element for the position information" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get a short description of the member, also choose the &lt;strong&gt;Text&lt;/strong&gt; element and then choose the &lt;strong&gt;Post Content&lt;/strong&gt; option in the &lt;strong&gt;Post&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xTKzD3ZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/HRl7yeL.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xTKzD3ZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/HRl7yeL.gif" alt="Choose Text element to get a short description of the element" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have just displayed all the wanted information from a team member on the name card.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LCFSXrHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/PcCfICY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LCFSXrHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/PcCfICY.png" alt="All the information has been obtained" width="880" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Global Block&lt;/h2&gt;

&lt;p&gt;Go back to the created global block. Then, customize each element to get the wanted display.&lt;/p&gt;

&lt;p&gt;After styling, you’ll see the new look of the name card, which contains each team member’s information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t9X-nMNR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/8eYqkaS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t9X-nMNR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/8eYqkaS.png" alt="Style the global block" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create the Page&lt;/h2&gt;

&lt;p&gt;Now, create a new page, and edit it with &lt;strong&gt;Breakdance.&lt;/strong&gt; First, add a section to contain all the information of the team members.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FEvAXASN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/WA9527P.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FEvAXASN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/WA9527P.png" alt="Create a page" width="880" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, add a heading to name it.&lt;/p&gt;

&lt;p&gt;To display the wanted posts, which means for the team members’ information, choose a &lt;strong&gt;Post Loop Builder&lt;/strong&gt; element. In the &lt;strong&gt;Global Block&lt;/strong&gt; section of this element's settings, choose the global block which has just been created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qzFTTQvm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/xlwmOEz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qzFTTQvm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/xlwmOEz.png" alt="Choose a Post Loop Builder element to displayed the wanted posts" width="880" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To stipulate the source of data and the team members you want to display, go to the &lt;strong&gt;Query&lt;/strong&gt; section &amp;gt; &lt;strong&gt;Custom&lt;/strong&gt;, then edit the query like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ca4ZngrF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ofG6plR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ca4ZngrF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ofG6plR.png" alt="Edit the query" width="880" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In there&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;In the &lt;strong&gt;Source&lt;/strong&gt; data, it’ll be automatically set as the Post Types, then choose the name of the team members you want to get the post from.&lt;/li&gt;
    &lt;li&gt;In the &lt;strong&gt;Post&lt;/strong&gt; &lt;strong&gt;per page&lt;/strong&gt; section, enter the number to limit the number of posts you want to display on this page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After applying the query, the team members’ information has just been obtained.&lt;/p&gt;

&lt;p&gt;Now, I’ll set the layout for this page. Then, all of the team members’ information is displayed as I want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PR2Phjuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/FbE73YE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PR2Phjuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/FbE73YE.png" alt="The final result" width="880" height="679"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;Is it so easy to create the team members' page using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Breakdance&lt;/strong&gt; without coding, right?&lt;/p&gt;

&lt;p&gt;If you think this practice is helpful, try it out and share the results with us. And, don’t forget to follow our channel.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>customfields</category>
      <category>dynamicdata</category>
      <category>breakdance</category>
    </item>
    <item>
      <title>How to Create Menus for Restaurants - P2- Using Meta Box and Bricks</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 07 Feb 2023 01:43:03 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-create-menus-for-restaurants-p2-using-meta-box-and-bricks-47pj</link>
      <guid>https://dev.to/wpmetabox/how-to-create-menus-for-restaurants-p2-using-meta-box-and-bricks-47pj</guid>
      <description>&lt;p&gt;If you’re having a food ordering service or something similar, there will be a large number of restaurants on your site. Definitely, each restaurant has its own menu and you may want to &lt;strong&gt;create their own menu&lt;/strong&gt; for each one. In this practice, we’re going to find out how to do it using &lt;strong&gt;Meta Box &lt;/strong&gt;and &lt;strong&gt;Bricks Builder&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is my example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FerBL42i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FerBL42i.png" alt="Example of the created menu" width="800" height="656"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/IKezivBoazI" rel="noopener noreferrer"&gt;https://youtu.be/IKezivBoazI&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;Normally, we can create a new post type and each dish will be a post of that post type. However, in this case, I want to put dishes into a menu for a particular restaurant. And each restaurant including its information will be displayed on a singular page. So, instead of creating each dish as a separate post of different post type, all the detailed information of the dish in the menu will be saved in custom fields stored in the post containing the restaurants’ information.&lt;/p&gt;

&lt;p&gt;In this practice, we need these tools:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/" rel="noopener noreferrer"&gt;Meta Box core plugin&lt;/a&gt;: to have a framework to create custom post type and custom fields;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/" rel="noopener noreferrer"&gt;MB Custom Post Type&lt;/a&gt;: to create custom post type for the restaurants;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/" rel="noopener noreferrer"&gt;Meta Box Builder&lt;/a&gt;: to have a UI on the back end to create custom fields easily;&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Bricks Builder&lt;/strong&gt;: to create the page to display the menu.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create a Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; Add New&lt;/strong&gt; to create a new post type for the restaurants.&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F72YZrNw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F72YZrNw.png" alt="Create a custom post type" width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt; to create fields. I’ll create all the fields with the structure like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Field type&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Settings&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;Menu Details&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;Group&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span&gt;Collapsible&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span&gt;Cloneable&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;        Name&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;Text&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;        Price&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;Text&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;        Description&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;Text&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;        Image&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;Single Image&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fc8DdCdL.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fc8DdCdL.png" alt="The created fields" width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see from the above image, there is a group with 4 subfields inside. These subfields are for the dish detail. To add more dishes, set this group to be cloneable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FyiivMPt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FyiivMPt.png" alt="Set the group to be cloneable" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, there’ll be an &lt;strong&gt;Add more&lt;/strong&gt; button to allow adding more dishes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVa9Tcdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVa9Tcdg.png" alt="Add more button to allow adding more dishes" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If there are many dishes on the menu, it will be a bit messy. So, to avoid messing up, you can set this group to be collapsible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPNeWhyM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPNeWhyM.png" alt="Set the group to be collapsible" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’ll be neat when adding information for the menu like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0gIVm99.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0gIVm99.png" alt="The information is displayed in a tidy way" width="800" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post type&lt;/strong&gt; &amp;gt; select &lt;strong&gt;Restaurant&lt;/strong&gt; to apply these fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FDcnUzxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FDcnUzxe.png" alt="Set location for the created fields" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you can see all the created fields in the post editor. Just fill in the dishes’ details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKhFMMUr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKhFMMUr.png" alt="All created fields in the post editor" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Display the Menu Information&lt;/h2&gt;

&lt;p&gt;I already have a singular page that displays all of the detailed information of a restaurant which is a post in the Restaurant post type with a template below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FJMBi6OR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FJMBi6OR.png" alt="The singular page to display all the detailed information of the restaurant" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s edit the template of this page with Bricks to add the menu.&lt;/p&gt;

&lt;p&gt;First, to contain all the menu's information, add a new &lt;strong&gt;Div&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FcZ2MV4n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FcZ2MV4n.png" alt="Add a Div element to contain all the information" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, choose the &lt;strong&gt;Heading&lt;/strong&gt; element and name the menu.&lt;/p&gt;

&lt;p&gt;To contain the dishes’ information, add the &lt;strong&gt;Container&lt;/strong&gt; element inside the div. Then, to get the data of the dishes, enable the &lt;strong&gt;Use query loop&lt;/strong&gt; button. And in the &lt;strong&gt;Query&lt;/strong&gt; section, choose the type of data source. Because our information is saved in the custom fields which are included in a clonable group, we should choose the type as &lt;strong&gt;MB Group&lt;/strong&gt; along with the name of the group that we have created for the custom field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FE1AeYsS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FE1AeYsS.png" alt="Add a Container element inside the Div element and enable Use query loop to get the data" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get the dish’s name, choose the &lt;strong&gt;Heading&lt;/strong&gt; element. As the name of the dish is saved in the custom field of Meta Box, use the &lt;strong&gt;Select Dynamic data&lt;/strong&gt; button and choose the field name in which we store the name of the dishes. Now you can see that the dishes’ names have just been displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FK5HAkiu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FK5HAkiu.gif" alt="Choose the Heading element to get the dish's name" width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the dish’s price, choose the &lt;strong&gt;Basic Text&lt;/strong&gt; element. It’s also stored in the created custom field. So, we also use the &lt;strong&gt;Select Dynamic data&lt;/strong&gt; button and choose the field correspondingly. Then, you’ll see the dish’s price displayed immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FtmkgKhO.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FtmkgKhO.gif" alt="Add a Basic text element for the dish's price" width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To add the dish’s description, do likewise with the dish’s price. Just duplicate the &lt;strong&gt;Basic Text&lt;/strong&gt; element and connect it to the corresponding field to get the right information..&lt;/p&gt;

&lt;p&gt;For the last information - the dish’s image, choose the &lt;strong&gt;Image&lt;/strong&gt; element. Since the images are also saved in the custom field as well, choose the &lt;strong&gt;Select Dynamic data&lt;/strong&gt; button and select the right field. Here, you see that the dish’s image has just been obtained already.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQPOYEiH.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQPOYEiH.gif" alt="Add a Image element for the dish's image" width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have just displayed all the wanted information of the dishes.&lt;/p&gt;

&lt;p&gt;Go to the frontend, you’ll see all of the menu information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fi2e8Jrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fi2e8Jrj.png" alt="The menu in the frontend" width="800" height="649"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Menu&lt;/h2&gt;

&lt;p&gt;Back to the page editor with Bricks Builder. Then, customize each element to style them in your own way. We can add some images to decorate the menu.&lt;/p&gt;

&lt;p&gt;On the frontend, you’ll see the wanted style of the menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FMyvG5PJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FMyvG5PJ.png" alt="The final result after styling" width="800" height="684"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;We have finished creating a menu for a restaurant with simple steps. Hope this practice will give you a hand in creating a new one. Let’s try it and share the result with us.&lt;/p&gt;

&lt;p&gt;Keep an eye on our blog and best wishes!&lt;/p&gt;

</description>
      <category>career</category>
      <category>discuss</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How to Display the Latest Products - P6 - using Meta Box and Breakdance</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 31 Jan 2023 01:25:15 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-display-the-latest-products-p6-using-meta-box-and-breakdance-388m</link>
      <guid>https://dev.to/wpmetabox/how-to-display-the-latest-products-p6-using-meta-box-and-breakdance-388m</guid>
      <description>&lt;p&gt;There are various ways to &lt;strong&gt;display the latest products section&lt;/strong&gt; using Meta Box and &lt;a href="https://metabox.io/series/latest-products/"&gt;page builders&lt;/a&gt;. In today's practice, we're going to do it using Meta Box and Breakdance.&lt;/p&gt;

&lt;p&gt;I take the restaurants as an example for the posts as well as for the products:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YTle0W6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/sTREMWQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YTle0W6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/sTREMWQ.png" alt="The example of displaying the latest products" width="880" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/HrhJUBQA7Uk"&gt;https://youtu.be/HrhJUBQA7Uk&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;In this case, my products are restaurants. Each restaurant will be a post in a custom post type and displayed in a box as in the image below. It is created as a global block in Breakdance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TC3Ef6rY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/OFq9unJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TC3Ef6rY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/OFq9unJ.png" alt="Each restaurant is a post in a custom post type" width="880" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the block, the name of the restaurant and its image are the title and the featured image of the post. Further, you may want to add some extra information for your products, so I have something as a demo, such as logo, address, and voucher. This extra information will be saved in the custom fields created by Meta Box.&lt;/p&gt;

&lt;p&gt;And, in this section, only the 6 latest restaurants will be displayed.&lt;/p&gt;

&lt;p&gt;For this practice, we need these tools:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/"&gt;Meta Box core plugin&lt;/a&gt;: to have the framework for creating custom post type and custom fields.&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/mb-custom-post-type/"&gt;MB Custom Post Types&lt;/a&gt;: to create custom post types for the products;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Breakdance&lt;/strong&gt;: to build the page and create a section to display the latest posts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create a New Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; New Post Type&lt;/strong&gt; to create a new post type for the products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O3U80SrC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ZwkLvos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O3U80SrC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ZwkLvos.png" alt="Create a new custom post type" width="880" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Each restaurant has extra information, so we’ll create custom fields to save them. Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt; to create fields. Here are the fields that I’ll create:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YyrlqSee--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ZJ7E9r5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YyrlqSee--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ZJ7E9r5.png" alt="The created custom fields" width="880" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; &amp;gt; choose &lt;strong&gt;Post Type&lt;/strong&gt; as the &lt;strong&gt;Restaurants&lt;/strong&gt; post type to apply these fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h34NEzgM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/c2WVoJv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h34NEzgM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/c2WVoJv.png" alt="Set location for the created fields as post type" width="880" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to the post editor, you will see all of the created custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wj9JlOCM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/0by2k0P.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wj9JlOCM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/0by2k0P.png" alt="All the created fields appear in the post editor" width="880" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just fill in the information.&lt;/p&gt;

&lt;h2&gt;Create a Global Block&lt;/h2&gt;

&lt;p&gt;Now, let’s create a global block to get the post information! Go to &lt;strong&gt;Breakdance &amp;gt; Global Blocks&lt;/strong&gt; then create a new one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m4ryE5FS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/yydOEph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m4ryE5FS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/yydOEph.png" alt="Create a global block" width="880" height="646"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember to set the preview for the global block.&lt;/p&gt;

&lt;p&gt;My global block is to display the information of each post in a box like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zp35NpMG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/upsbvVj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zp35NpMG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/upsbvVj.png" alt="The information of each post is displayed in the global block" width="500" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, we'll add a div for this box.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Ze57A5x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/EMwkovo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Ze57A5x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/EMwkovo.png" alt="Add a div element" width="880" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, add an &lt;strong&gt;Image&lt;/strong&gt; element to display the featured image of the post. To insert dynamic data for this element, just click the icon in the image below and choose the &lt;strong&gt;Featured Image&lt;/strong&gt; option in the &lt;strong&gt;Post&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k1TpyaMD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DGURTdQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k1TpyaMD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DGURTdQ.png" alt="Add an Image element for the featured image" width="880" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the restaurant’s name, select a &lt;strong&gt;Text Link&lt;/strong&gt; element to display the name in link format. Then, choose the &lt;strong&gt;Post Title&lt;/strong&gt; option. And, if you want to set the hyperlink, choose the &lt;strong&gt;Post Permalink&lt;/strong&gt; option in the &lt;strong&gt;Link&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dWmQpavQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/tstVynR.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dWmQpavQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/tstVynR.gif" alt="Select a Text Link element for the restaurant's name" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To display the restaurant’s address, add a &lt;strong&gt;Text&lt;/strong&gt; element. As the address is saved in the custom field created by Meta Box, we’ll insert the dynamic data into this element. Also, click the icon as we did before and choose the corresponding field name in the &lt;strong&gt;Meta Box&lt;/strong&gt; section. Then, the restaurant’s address will be obtained.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hhjz4fel--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/lN1j9eg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hhjz4fel--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/lN1j9eg.gif" alt="Do likewise with the voucher information" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the voucher information, do likewise.&lt;/p&gt;

&lt;p&gt;For the last one - the logo of the restaurant, we’ll add an &lt;strong&gt;Image&lt;/strong&gt; element for it. The logo is saved in the custom field as well, so we’ll also insert the dynamic data into this element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hhjz4fel--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/lN1j9eg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hhjz4fel--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/lN1j9eg.gif" alt="Add an Image element for the logo of the restaurant" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have just displayed all the wanted information from the restaurant.&lt;/p&gt;

&lt;h2&gt;Add the Section to the Homepage&lt;/h2&gt;

&lt;p&gt;Let’s edit the homepage with Breakdance. First, add a new section to the page to contain all the latest products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MbXzEllC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7We9NeN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MbXzEllC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7We9NeN.png" alt="Add a Section to the Homepage" width="880" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, add a heading to name it.&lt;/p&gt;

&lt;p&gt;For displaying the wanted posts, choose a &lt;strong&gt;Post Loop Builder&lt;/strong&gt; element. In the &lt;strong&gt;Global Block&lt;/strong&gt; section of this element's settings, choose the global block which has just been created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XCywulwN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/zuKFTsx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XCywulwN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/zuKFTsx.png" alt="Choose a Post Loop Builder element to display the wanted posts" width="880" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To stipulate the source of data and the products you want to display in the section, go to the &lt;strong&gt;Query&lt;/strong&gt; section &amp;gt; &lt;strong&gt;Custom&lt;/strong&gt; &amp;gt; then edit the query like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kft9lB4X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/AgDuofT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kft9lB4X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/AgDuofT.png" alt="Go to Query section &amp;gt; Custom &amp;gt; then edit the query to stipulate the source of data" width="880" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In there:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;In the &lt;strong&gt;Source&lt;/strong&gt; data, it’ll be automatically set as the &lt;strong&gt;Post Types&lt;/strong&gt;, then choose the name of the product you want to get the post from.&lt;/li&gt;
    &lt;li&gt;In the &lt;strong&gt;Post per page&lt;/strong&gt; section, enter the number to limit the number of posts you want to display in this section.&lt;/li&gt;
    &lt;li&gt;In the &lt;strong&gt;Order&lt;/strong&gt; section, the query also automatically sets the order by date and descending. It means that the latest post will be displayed first and then the older one. That’s exactly what we want in this practice. So, we just keep this setting by default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After applying the query, you’ll see all the latest restaurants appear in the order you want.&lt;/p&gt;

&lt;h2&gt;Style the Section&lt;/h2&gt;

&lt;p&gt;Go back to the created global block. Then, customize each element, and also can add some CSS to the element to get the wanted display.&lt;/p&gt;

&lt;p&gt;After styling the global block, back to the homepage, you’ll see the information of the posts will have a new look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JGiEL-Ta--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/eA4bAZd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JGiEL-Ta--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/eA4bAZd.png" alt="Style the section" width="880" height="686"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we’ll set the layout of the section for better display. Go to edit the homepage with Breakdance, and change the setting of each element.&lt;/p&gt;

&lt;p&gt;After that, you’ll see the new appearance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YTle0W6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/sTREMWQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YTle0W6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/sTREMWQ.png" alt="The final result after styling" width="880" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;We’ve gone through all the specific steps to display the latest products section using Meta Box and Breakdance.&lt;/p&gt;

&lt;p&gt;Let’s try it out and share the results with us! Thank you for reading!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>breakdance</category>
      <category>dynamicdata</category>
      <category>customfield</category>
    </item>
    <item>
      <title>How to Create a Product Page - P4 - Using Meta Box and Elementor</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 17 Jan 2023 01:44:52 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-create-a-product-page-p4-using-meta-box-and-elementor-2lap</link>
      <guid>https://dev.to/wpmetabox/how-to-create-a-product-page-p4-using-meta-box-and-elementor-2lap</guid>
      <description>&lt;p&gt;Let’s see &lt;strong&gt;how to create a great product page&lt;/strong&gt; using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Elementor&lt;/strong&gt; with some simple steps! I also take a car rental for the product as an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IMjDkUty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/eR5DcdE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IMjDkUty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/eR5DcdE.png" alt="Example of a product page" width="880" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/gI0M5nuzPj8"&gt;https://youtu.be/gI0M5nuzPj8&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;The product page is a singular page. All of its information is saved in a post of a custom post type. The name of the product and its descriptions are the title and content of the post. The remaining detailed information will be saved in the custom fields that are created by &lt;strong&gt;Meta Box&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eFaURMnn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DaLle8J.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eFaURMnn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/DaLle8J.png" alt="A product page is a singular page" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, in this practice, we need these tools:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/"&gt;Meta Box core plugin&lt;/a&gt;: to have a framework to create a custom post type and custom fields;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/"&gt;MB Custom Post Type&lt;/a&gt;: to create custom post types for the products;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/"&gt;Meta Box Builder&lt;/a&gt;: to have a UI on the back end to create custom fields easily;&lt;/li&gt;
    &lt;li&gt;
&lt;a href="https://metabox.io/plugins/mb-elementor-integrator/"&gt;Meta Box - Elementor Integrator&lt;/a&gt;: to get the dynamic data from custom fields created by Meta Box;&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Elementor&lt;/strong&gt; to build the page. I’m using &lt;strong&gt;Elementor Pro&lt;/strong&gt;, which has integration with Meta Box.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create a New Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; New Post Type&lt;/strong&gt; to create a new custom post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lr5kbWOc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/1UoEKF3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lr5kbWOc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/1UoEKF3.png" alt="Create a new custom post type" width="880" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;The product has extra detailed information, so we’ll create custom fields to save them. Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt;, then create fields as you want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ztyDG16--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/RLzyil1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ztyDG16--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/RLzyil1.png" alt="Create custom fields " width="880" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my case, I just take a typical example of car rental with some common fields. Here are the fields that I created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KNKzpN4i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/W1deiPo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KNKzpN4i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/W1deiPo.png" alt="The created custom fields" width="880" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To know more about the field type, you may have your own specific information for the product. So, you may want to find out each field type to get the matching one. We have a video to talk about &lt;a href="https://youtu.be/WWeaM5vIAwM"&gt;all the field types of Meta Box&lt;/a&gt; in detail. You can dig into it.&lt;/p&gt;

&lt;p&gt;After creating all fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; &amp;gt; choose &lt;strong&gt;Post Type&lt;/strong&gt; as&lt;strong&gt; Car Rental&lt;/strong&gt; to apply these fields to this post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2KSLuAjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/I1gm1Oa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2KSLuAjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/I1gm1Oa.png" alt="Set location for the created custom fields as post type" width="880" height="536"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the post editor, you will see all of the created custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c4r6wY8D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/SjBBCpL.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c4r6wY8D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/SjBBCpL.png" alt="All created fields in the post editor" width="880" height="691"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create a Template&lt;/h2&gt;

&lt;p&gt;Go to the &lt;strong&gt;Elementor Theme Builder&lt;/strong&gt; and create a new template. Since it’s for a singular page of a custom post type, we’ll create it in the type of a single post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sFsMXdcP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/yyXmCoo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sFsMXdcP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/yyXmCoo.png" alt="Create a template" width="880" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After setting the preview for the template, let’s edit it.&lt;/p&gt;

&lt;p&gt;My product page has two columns like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_rQq7cjx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/YcW9Ksx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_rQq7cjx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/YcW9Ksx.png" alt="Two columns of the product page" width="880" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, first, add a widget and choose the layout for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RV0o1XDr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/qgwzmNm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RV0o1XDr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/qgwzmNm.png" alt="Add a widget and choose the layout" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the first column, select the &lt;strong&gt;Image Carousel&lt;/strong&gt; to display the image gallery as a slider. Then, to get the image that is saved in the custom field, go to the &lt;strong&gt;Dynamic Tags&lt;/strong&gt;, find the &lt;strong&gt;Meta Box Field&lt;/strong&gt; in the &lt;strong&gt;Post&lt;/strong&gt; section, and choose the field that is set for the image. After that, you can see all of the images appear&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hZKegSGC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/RkfR1jo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hZKegSGC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/RkfR1jo.gif" alt="Find the corresponding field to get the data by using Dynamic Data" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Move to the second column to display other information about the product. The first one is the product's name which is saved in the post title. So, choose the &lt;strong&gt;Post Title&lt;/strong&gt; element &amp;gt; select the &lt;strong&gt;Post Content&lt;/strong&gt; element to get the product’s description.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sY5ndmKR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/3uJDuKv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sY5ndmKR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/3uJDuKv.png" alt="Choose the post title element for the product's description" width="880" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the rental price information, choose the &lt;strong&gt;Text Editor&lt;/strong&gt; element. Since the rental price is saved in custom fields created by Meta Box, also use the &lt;strong&gt;Dynamics Tags &amp;gt; Meta Box Field&lt;/strong&gt; in the &lt;strong&gt;Post&lt;/strong&gt; section &amp;gt; choose the corresponding fields. A number will be displayed without a unit of the pricing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sJ25DYu---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/JKWxASC.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sJ25DYu---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/JKWxASC.gif" alt="Choose the Text Editor element for the rental price information" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To have the unit displayed, go to the &lt;strong&gt;Advanced&lt;/strong&gt; section, and add the currency unit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DzDnTTUq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/M9prrn2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DzDnTTUq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/M9prrn2.png" alt="Add the currency unit in the Advanced section" width="880" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the rest of the information in this section, they have the same style with 2 columns. The first one is the title, and the second one is the information that is obtained from the custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---3XBA69U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/SDHPQ9D.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---3XBA69U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/SDHPQ9D.png" alt="The rest of the information will have the same style with 2 columns" width="880" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thus, we’ll use the &lt;strong&gt;Inner Section&lt;/strong&gt; with 2 columns as well for each row.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8JGZtFxU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/quyDxUW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8JGZtFxU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/quyDxUW.png" alt="Use the Inner Section with 2 columns" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iXjzg59l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/HDkwhM1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iXjzg59l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/HDkwhM1.png" alt="2 columns for each row" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first column is the title. So, select the &lt;strong&gt;Heading&lt;/strong&gt; element, then just name and style it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5KjbRM2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/uSpRUnR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5KjbRM2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/uSpRUnR.png" alt="Select the Heading element for the title" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the second column in the &lt;strong&gt;Inner Section&lt;/strong&gt; element, add a &lt;strong&gt;Text Editor&lt;/strong&gt; element, then connect it to the custom field to get the data using the dynamic tags. Take &lt;strong&gt;Car Year&lt;/strong&gt; as an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TdqdDOS4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/dsNR88Q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TdqdDOS4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.imgur.com/dsNR88Q.gif" alt="Add a Text Editor element in the Inter Section element then connect it to the right field" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can duplicate the &lt;strong&gt;Inner Section&lt;/strong&gt; to have other rows and change the information to get the right one.&lt;/p&gt;

&lt;p&gt;After getting all of the information about the product, remember to set the condition for this template to apply it to the singular page of the &lt;strong&gt;Car Rental&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e-vbPajg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ykzuUrs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e-vbPajg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/ykzuUrs.png" alt="Set the condition for the template " width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, in the frontend, all of the product's detailed information is displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tGsqQUtD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Ije0Xxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tGsqQUtD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Ije0Xxw.png" alt="All the product's information is displayed" width="880" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Page&lt;/h2&gt;

&lt;p&gt;Still in the editor of the created template, just customize each element to get the wanted style.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fn5byI6H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Nek1KHd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fn5byI6H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Nek1KHd.png" alt="Style the Page" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After styling, you’ll see the new look.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IMjDkUty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/eR5DcdE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IMjDkUty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/eR5DcdE.png" alt="The final result after styling " width="880" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;Hopefully, all the following steps above can give you a hand in creating a detailed product page. If you use other page builders, you can dig into &lt;a href="https://metabox.io/series/product-page/"&gt;the series on how to create a product page with different page builders&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want to suggest any tutorials, feel free to leave a comment. Thank you for reading. Good luck!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>customfield</category>
      <category>dynamicdata</category>
      <category>elementor</category>
    </item>
    <item>
      <title>How to Filter Posts by Custom Fields - P2 - using Meta Box and FacetWP</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 10 Jan 2023 02:21:03 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-filter-posts-by-custom-fields-p2-using-meta-box-and-facetwp-4049</link>
      <guid>https://dev.to/wpmetabox/how-to-filter-posts-by-custom-fields-p2-using-meta-box-and-facetwp-4049</guid>
      <description>&lt;p&gt;On an archive page, we'll display posts and filter them by the values stored in the custom fields created by Meta Box. With the help of &lt;strong&gt;FacetWP&lt;/strong&gt;, we can do it easily without coding.&lt;/p&gt;

&lt;p&gt;Here is an archive that I created for example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKcIh5xL.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKcIh5xL.gif" alt="The example of filtering posts" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/kjkVaC_QKQs" rel="noopener noreferrer"&gt;https://youtu.be/kjkVaC_QKQs&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;On the page, we'll have 2 sections. One is used to filter the restaurants by conditions. We'll create this part using &lt;strong&gt;FacetWP&lt;/strong&gt;. The second part is to show up all the restaurants.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1KwGTbg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1KwGTbg.png" alt="Two sections of the page" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the information of the restaurants is saved in a custom post type. Each restaurant is a post of that post type. Besides the basic information such as name and image of the restaurants which are the post title and featured images, other additional information will be saved in different custom fields.&lt;/p&gt;

&lt;p&gt;In the upcoming execution, we'll create them one by one. No matter if you're using any page builder or not, you can also use &lt;strong&gt;FacetWP&lt;/strong&gt; to filter posts as I'm doing in this practice. In this case, I chose &lt;strong&gt;Elementor&lt;/strong&gt; to build the page and use the pro version.&lt;/p&gt;

&lt;p&gt;For the custom fields, we need&lt;a href="https://wordpress.org/plugins/meta-box/" rel="noopener noreferrer"&gt; Meta Box core plugin&lt;/a&gt; and some of its extensions, including:&lt;/p&gt;

&lt;ul&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/" rel="noopener noreferrer"&gt;MB Custom Post Types &amp;amp; Custom Taxonomies&lt;/a&gt;: to create custom post type;&lt;/li&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/" rel="noopener noreferrer"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-facetwp-integrator/" rel="noopener noreferrer"&gt;Meta Box - FacetWP Integrator&lt;/a&gt;: to create a filter based on the custom fields;&lt;/li&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/mb-elementor-integrator/" rel="noopener noreferrer"&gt;Meta Box Elementor Integrator&lt;/a&gt;: to connect and display custom fields created by Meta Box in the &lt;strong&gt;Elementor&lt;/strong&gt;'s dynamic tags.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;Create a Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types &amp;gt; Add New&lt;/strong&gt; to create a new post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6sOZGUC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6sOZGUC.png" alt="Create a custom post type" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After publishing, we'll have a new &lt;strong&gt;Restaurants&lt;/strong&gt; menu in the admin dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTnHSOKQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTnHSOKQ.png" alt="The created post type appears in the admin dashboard" width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, let's create custom fields to save restaurants' information in the next step.&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt; to create a new field group. Here are the field that I created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fz2NgC9J.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fz2NgC9J.png" alt="The created custom fields" width="800" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the &lt;strong&gt;Voucher&lt;/strong&gt; information, choose the &lt;strong&gt;Checkbox list&lt;/strong&gt; field to allow adding some options in the &lt;strong&gt;Choices&lt;/strong&gt; box. These options will be used as a condition to filter posts when creating a filter section in the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FCAFAseK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FCAFAseK.png" alt="Choose the Checkbox list field for the Voucher information to add some options in the Choices box" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the needed fields, move to the &lt;strong&gt;Settings&lt;/strong&gt; tab, choose &lt;strong&gt;Location&lt;/strong&gt; as &lt;strong&gt;Post Type&lt;/strong&gt; and select &lt;strong&gt;Restaurant&lt;/strong&gt; to apply these fields to this post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FaH4gsoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FaH4gsoe.png" alt="Set Location for the created post type" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When creating a new post in Restaurant post type, you'll see all the created custom fields:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkNNgVlz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkNNgVlz.png" alt="All created custom fields appear in a new post of the created post type" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create a Template&lt;/h2&gt;

&lt;p&gt;Depending on the page builder you're using, there will be some differences in the creating page and template. You may need to create a template for the page or edit the page directly.&lt;/p&gt;

&lt;p&gt;In this case, with &lt;strong&gt;Elementor&lt;/strong&gt;, we need to create one. This template is to display all the posts along with their information. About the filter section, we'll create it later.&lt;/p&gt;

&lt;p&gt;Since we'll have a list of restaurants on the page, we need a special type of template which is a loop. This option is provided by &lt;strong&gt;Elementor Custom Skin&lt;/strong&gt;. You can try it.&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Templates&lt;/strong&gt; &amp;gt; &lt;strong&gt;Theme Builder&lt;/strong&gt; and choose &lt;strong&gt;Loop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fj1X9403.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fj1X9403.png" alt="Go to Templates and then Theme Builder " width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FC3XZx7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FC3XZx7u.png" alt="Choose Loop option" width="800" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember to set the preview for the template.&lt;/p&gt;

&lt;p&gt;Since the image and name of the restaurants are the featured image and title of the post, add the &lt;strong&gt;Featured Image&lt;/strong&gt; and &lt;strong&gt;Post Title&lt;/strong&gt; elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ft88N4jD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ft88N4jD.png" alt="Add the Featured Image and Post Title elements " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the address of the restaurant, add the &lt;strong&gt;Text Editor&lt;/strong&gt; element. Since the restaurants' addresses are saved in a custom field created by Meta Box and the custom field is for post, let's use the &lt;strong&gt;Dynamic Tags&lt;/strong&gt; &amp;gt; choose &lt;strong&gt;Meta Box Fields&lt;/strong&gt; in the &lt;strong&gt;Post&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FdI5pXSb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FdI5pXSb.png" alt="Add the Text Editor element for the address of the restaurant" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then, select the corresponding field. In this case, it's &lt;strong&gt;Address&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FtG9sWJw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FtG9sWJw.png" alt="Connect the Text Editor element to the correct field by using Dynamic Tags" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the voucher information, do likewise.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNRH3aIC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNRH3aIC.png" alt="Do likewise with the voucher information" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FD9iY0Xr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FD9iY0Xr.png" alt="Connect the element to the right field" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, all the restaurant's information has been displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPQzv5RG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPQzv5RG.png" alt="All the information has been obtained" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Save the template and remember to set the condition to apply this template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F23Wa2Fh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F23Wa2Fh.png" alt="Save the template and remember to set the condition to apply this template" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create the Page&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Pages&lt;/strong&gt; to create a new page and &lt;strong&gt;edit it with Elementor.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjogEKj6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjogEKj6.png" alt="Create a new page" width="800" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the &lt;strong&gt;Posts&lt;/strong&gt; element to the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVGioxUT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVGioxUT.png" alt="Add the Posts element to the page" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Skin&lt;/strong&gt; setting of the &lt;strong&gt;Posts&lt;/strong&gt; element, choose &lt;strong&gt;Custom&lt;/strong&gt; and then select the default template as the one we've just created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYwgDCzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYwgDCzr.png" alt="In the Skin setting of the Posts element, choose Custom and then select the created template " width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, go to the &lt;strong&gt;Query&lt;/strong&gt; section, choose the source as the post type you want. In this case, it's &lt;strong&gt;Restaurant&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fef865A8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fef865A8.png" alt="In the Query section, choose the source as the wanted post type" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, the preview shows all the posts with the information as we want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FUIxRMnQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FUIxRMnQ.png" alt="The preview shows all the posts with the information." width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's see how to add a filter section in the next step.&lt;/p&gt;

&lt;h2&gt;Add Filter&lt;/h2&gt;

&lt;p&gt;This task will be done by &lt;strong&gt;FacetWP&lt;/strong&gt;. If you use other page builders, you can also create the filter as I'm doing in this practice.&lt;/p&gt;

&lt;p&gt;In the admin dashboard, go to &lt;strong&gt;Settings&lt;/strong&gt; and choose &lt;strong&gt;FacetWP&lt;/strong&gt; to create a new filter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FxR9nNT6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FxR9nNT6.png" alt="Create a new filter" width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since we will filter the post by the promotion of the restaurant which is saved in the &lt;strong&gt;Voucher&lt;/strong&gt; field, choose the &lt;strong&gt;Data Source&lt;/strong&gt; as &lt;strong&gt;Voucher&lt;/strong&gt; in the &lt;strong&gt;Restaurant&lt;/strong&gt; post type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTBkcCS5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTBkcCS5.png" alt="Choose the Data Source as Voucher in the Restaurant post type" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Save the changes and copy the shortcode of the facet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F7KTGmPH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F7KTGmPH.png" alt="Save the changes and copy the shortcode of the facet" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, go back to the created page editor with &lt;strong&gt;Elementor&lt;/strong&gt;, add a &lt;strong&gt;Shortcode&lt;/strong&gt; element to paste the code we've just copied.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjjFu27A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FjjFu27A.png" alt="Add a Shortcode element to paste the copied code" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After applying the code, you'll see a section to filter posts in the frontend. All the restaurants having the same coupons are filtered correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FZUipHsz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FZUipHsz.gif" alt="All the restaurants having the same coupons are filtered correctly" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Page&lt;/h2&gt;

&lt;p&gt;Go back to the template of the page, you can style each element as you want.&lt;/p&gt;

&lt;p&gt;In the event that you want to have more further styling, you can use some CSS code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6k2QCRy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6k2QCRy.png" alt="Style the page" width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the changes in style will be applied immediately. This is how it looks on the frontend. The filter section created by &lt;strong&gt;FacetWP&lt;/strong&gt; works well and all the posts have been filtered.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKcIh5xL.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FKcIh5xL.gif" alt="The final result" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Last Words&lt;/h2&gt;

&lt;p&gt;Using custom fields with the help of &lt;strong&gt;FacetWP&lt;/strong&gt; is a brilliant way to create conditions and filter posts. If you see this practice is helpful, try it out and share the result with us. If you want to suggest any ideas, feel free to let us know by leaving a comment. Good luck!&lt;/p&gt;

</description>
      <category>bash</category>
      <category>terminal</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
    <item>
      <title>How to Display Images from Cloneable Fields - P4 - with Bricks</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 03 Jan 2023 03:01:47 +0000</pubDate>
      <link>https://dev.to/wpmetabox/how-to-display-images-from-cloneable-fields-p4-with-bricks-3cgd</link>
      <guid>https://dev.to/wpmetabox/how-to-display-images-from-cloneable-fields-p4-with-bricks-3cgd</guid>
      <description>&lt;p&gt;Continuing &lt;a href="https://metabox.io/series/display-images-from-cloneable-fields" rel="noopener noreferrer"&gt;the series&lt;/a&gt; of displaying images from cloneable fields, today we’ll use &lt;strong&gt;Meta Box&lt;/strong&gt; and another page builder - &lt;strong&gt;Bricks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Take the brand logos as an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmNQGqbR.png" class="article-body-image-wrapper"&gt;&lt;img alt="Example of displaying images from cloneable fields" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmNQGqbR.png" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Video Version
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/UZ-8JEEUNyc" rel="noopener noreferrer"&gt;https://youtu.be/UZ-8JEEUNyc&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Before Getting Started
&lt;/h2&gt;

&lt;p&gt;Typically, we’ll use a custom post type to create multiple posts for brands. But now, I’ll do another way more conveniently and simply - creating a settings page. All brand information will be input onto that page. It means that all of them will be in one place only.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FlQaXxjJ.png" class="article-body-image-wrapper"&gt;&lt;img alt="All brand information is put into the settings page" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FlQaXxjJ.png" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this practice, we need these tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/" rel="noopener noreferrer"&gt;Meta Box core plugin&lt;/a&gt;: to have the framework for creating custom fields. It’s free, so you can download it directly from &lt;a href="https://wordpress.org/plugins/mb-custom-post-type/" rel="noopener noreferrer"&gt;wordpress.org&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://metabox.io/plugins/mb-settings-page/" rel="noopener noreferrer"&gt;Meta Box Settings Page&lt;/a&gt;: to create settings pages to input images;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/" rel="noopener noreferrer"&gt;Meta Box Builder&lt;/a&gt;: to have an intuitive UI to create custom fields in the backend;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-group/" rel="noopener noreferrer"&gt;Meta Box Group&lt;/a&gt;: to organize custom fields into cloneable groups, where we input images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bricks&lt;/strong&gt;: to build the page&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Create a Settings Page
&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Settings Page &amp;gt; Add New.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In my case, the settings page is quite simple and contains only the image of each brand. As there’s no special setting, I'll just change the option name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVvrql4e.png" class="article-body-image-wrapper"&gt;&lt;img alt="Create a settings page" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVvrql4e.png" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After publishing, you’ll see a new settings page named &lt;strong&gt;Brands&lt;/strong&gt; appears as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FS1Z1BuW.png" class="article-body-image-wrapper"&gt;&lt;img alt="Created settings page appears in the menu dashboard" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FS1Z1BuW.png" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s blank now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Custom Fields
&lt;/h2&gt;

&lt;p&gt;Let’s create custom fields for the settings page. They will be used to save the brand information.&lt;/p&gt;

&lt;p&gt;In the admin dashboard, go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields &amp;gt; Add New&lt;/strong&gt;. I created fields with the structure below.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;**Field**&lt;/th&gt;
&lt;th&gt;**Types of Field**&lt;/th&gt;
&lt;th&gt;**ID**&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Brand Group&lt;/td&gt;
&lt;td&gt;Group&lt;/td&gt;
&lt;td&gt;brand_group&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brand Logo Upload&lt;/td&gt;
&lt;td&gt;Single Image&lt;/td&gt;
&lt;td&gt;brand_logo_upload&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brand Name&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;brand_name&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is a group with 2 subfields inside. It is also set to be cloneable to have more spaces to add information for different brands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FoVFMAGs.png" class="article-body-image-wrapper"&gt;&lt;img alt="Set the created fields to be cloneable" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FoVFMAGs.png" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, go to the &lt;strong&gt;Settings&lt;/strong&gt; tab and choose the &lt;strong&gt;Location&lt;/strong&gt; as the settings page that we’ve created to apply the custom fields to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fq8eWRPv.png" class="article-body-image-wrapper"&gt;&lt;img alt="Set location for the created fields" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fq8eWRPv.png" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back to the settings page, and you’ll see the created custom fields appear. Moreover, to add another brand’s information, you can press the &lt;strong&gt;Add more&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1e8AcPK.gif" class="article-body-image-wrapper"&gt;&lt;img alt="Add more button to add another brand's information" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F1e8AcPK.gif" width="1000" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, just fill in the brand’s information in the fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Display Images on the Frontend
&lt;/h2&gt;

&lt;p&gt;Let’s edit a page with &lt;strong&gt;Bricks&lt;/strong&gt;. I chose the homepage for example.&lt;/p&gt;

&lt;p&gt;First, to contain all the brands' information, add a new section. Then, put it in any place where you want to show it on that page.&lt;/p&gt;

&lt;p&gt;Next, to add the title of the section, choose the &lt;strong&gt;Heading&lt;/strong&gt; element and name it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FEJrofNF.png" class="article-body-image-wrapper"&gt;&lt;img alt="Choose the heading element to add the title of the section" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FEJrofNF.png" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Container&lt;/strong&gt; element inside the section, select the &lt;strong&gt;Div&lt;/strong&gt; element to contain the brand information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPxty2ap.png" class="article-body-image-wrapper"&gt;&lt;img alt="Add a Div a element in the Contain element to contain the brand information" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FPxty2ap.png" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, to get the data of brands, enable the &lt;strong&gt;Use query loop&lt;/strong&gt; button. And in the &lt;strong&gt;Query&lt;/strong&gt; section, choose the type of data source as &lt;strong&gt;MB Group: Brand Group&lt;/strong&gt;. In the name, you can see the ‘Brand Group’ is the name of the group that we’ve just created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F8uOrwqN.png" class="article-body-image-wrapper"&gt;&lt;img alt="Choose the type of data source as MB Group" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F8uOrwqN.png" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the brand’s logos, as they are saved in the custom field created by Meta Box, choose the &lt;strong&gt;Image&lt;/strong&gt; element &amp;gt; choose the &lt;strong&gt;Select Dynamic data&lt;/strong&gt; button &amp;gt; select the right field - Brand Image Upload. Now all the brand's logos are displayed already.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fq0VM7gp.gif" class="article-body-image-wrapper"&gt;&lt;img alt="All the brand's logos are already displayed" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fq0VM7gp.gif" width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the brand’s names, choose the &lt;strong&gt;Basic Text&lt;/strong&gt; element. We also use the &lt;strong&gt;Select Dynamic data&lt;/strong&gt; button and choose the field correspondingly. Then, you’ll see the brand’s name displayed immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F4sd3DoR.gif" class="article-body-image-wrapper"&gt;&lt;img alt="Choose the Basic text element and use the Select Dynamic data button then choose the field correspondingly" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F4sd3DoR.gif" width="760" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the homepage, you’ll see all of the brand information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FHlGt615.png" class="article-body-image-wrapper"&gt;&lt;img alt="All the brand information is displayed on the homepage" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FHlGt615.png" width="800" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Style the Section
&lt;/h2&gt;

&lt;p&gt;Now, go back to the page editor with &lt;strong&gt;Bricks&lt;/strong&gt;, choose each element and change the settings to style them in your own way.&lt;/p&gt;

&lt;p&gt;After styling, all the brand logos are displayed as we want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmNQGqbR.png" class="article-body-image-wrapper"&gt;&lt;img alt="Style the Section" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FmNQGqbR.png" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Last Words
&lt;/h2&gt;

&lt;p&gt;Is it so easy to display the images from cloneable fields with Meta Box and Bricks without coding, right?&lt;/p&gt;

&lt;p&gt;Remember to follow our channel and share your result in the comment section!&lt;/p&gt;

&lt;p&gt;---The publication at &lt;a href="https://metabox.io/display-images-from-cloneable-fields-p4-bricks/" rel="noopener noreferrer"&gt;Meta Box&lt;/a&gt;---&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Display the Most Viewed Posts - P2 - using Meta Box and Oxygen</title>
      <dc:creator>WP Meta Box Plugin</dc:creator>
      <pubDate>Tue, 20 Dec 2022 02:25:31 +0000</pubDate>
      <link>https://dev.to/wpmetabox/display-the-most-viewed-posts-p2-using-meta-box-and-oxygen-3bgb</link>
      <guid>https://dev.to/wpmetabox/display-the-most-viewed-posts-p2-using-meta-box-and-oxygen-3bgb</guid>
      <description>&lt;p&gt;Displaying the most viewed posts on your business website is a convenient way to attract viewers and potential customers. In this article, we will show you how to display your popular posts by views using &lt;strong&gt;Meta Box&lt;/strong&gt; and &lt;strong&gt;Oxygen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The image below is a specific example:&lt;/p&gt;

&lt;h2&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F4kOQh7l.png" alt="Example of displaying the most viewed posts" width="800" height="405"&gt;Video Version&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://youtu.be/3P6KJHquRL4" rel="noopener noreferrer"&gt;https://youtu.be/3P6KJHquRL4&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Before Getting Started&lt;/h2&gt;

&lt;p&gt;Since we're going to display the most viewed posts, we'll use a third-party plugin to count the post views. It's the &lt;a href="https://wordpress.org/plugins/post-views-counter/" rel="noopener noreferrer"&gt;Post Views Counter&lt;/a&gt; plugin.&lt;/p&gt;

&lt;p&gt;For the posts, we'll create a &lt;strong&gt;custom post type&lt;/strong&gt; named &lt;strong&gt;Restaurants&lt;/strong&gt;, and each restaurant will be a post of that post type.&lt;/p&gt;

&lt;p&gt;When displaying the most viewed posts, you may wish to show more than just the title and featured image (the default fields). In this case, I'll display extra information about the address, voucher, and logo. They'll be saved in the custom fields of the post.&lt;/p&gt;

&lt;p&gt;Here are the tools we need for this practice:&lt;/p&gt;

&lt;ul&gt;

   &lt;li&gt;
&lt;a href="https://wordpress.org/plugins/meta-box/" rel="noopener noreferrer"&gt;Meta Box core plugin&lt;/a&gt; to have a framework for creating a custom post type and custom fields;&lt;/li&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/custom-post-type/" rel="noopener noreferrer"&gt;MB Custom Post Type&lt;/a&gt; : to create custom post types;&lt;/li&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/meta-box-builder/" rel="noopener noreferrer"&gt;Meta Box Builder&lt;/a&gt; : to have a UI on the back end to create custom fields easily;&lt;/li&gt;

   &lt;li&gt;
&lt;a href="https://metabox.io/plugins/mb-views/" rel="noopener noreferrer"&gt;MB Views&lt;/a&gt;: help us create a template for the most viewed posts section.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Finally, we need &lt;a href="https://oxygenbuilder.com/" rel="noopener noreferrer"&gt;Oxygen Builder&lt;/a&gt;. You should use its 3.9 version or higher, which has native integration with Meta Box.&lt;/p&gt;

&lt;h2&gt;Create a New Custom Post Type&lt;/h2&gt;

&lt;p&gt;Go to &lt;strong&gt;Meta Box &amp;gt; Post Types&lt;/strong&gt; to create a new post type for the restaurants.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FMSAfcUL.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FMSAfcUL.png" alt="Create a new custom post type" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create Custom Fields&lt;/h2&gt;

&lt;p&gt;Each restaurant may have extra information saved in custom fields, so go to &lt;strong&gt;Meta Box &amp;gt; Custom Fields&lt;/strong&gt; and create them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FJqG6idp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FJqG6idp.png" alt="Create custom fields" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating all the needed fields, go to the &lt;strong&gt;Settings&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Location&lt;/strong&gt; &amp;gt; choose &lt;strong&gt;Post Type&lt;/strong&gt; as the &lt;strong&gt;Restaurant&lt;/strong&gt; post type we've just created to apply the custom fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FXGY0Ch6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FXGY0Ch6.png" alt="Set location for the created custom fields" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the post editor, you will see all of the newly created custom fields appear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0tzGv05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F0tzGv05.png" alt="All created custom fields appear in the post editor" width="800" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Count the Posts View&lt;/h2&gt;

&lt;p&gt;Normally, there is no information about the posts' view available in WordPress by default. We must do it on our own. Install the &lt;strong&gt;Post Views Counter&lt;/strong&gt; plugin, then go to &lt;strong&gt;Settings &amp;gt; Post Views Counter&lt;/strong&gt; and check the box next to the post type whose views you want to count.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FU9NGVTt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FU9NGVTt.png" alt="Install Post views counter plugin" width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right after that, you can see the view numbers of each restaurant appear. Based on these numbers, we'll choose which restaurant has the most views and display it in the section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fy4mB0Lj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fy4mB0Lj.png" alt="Choose which restaurants have the most views to display in the section" width="800" height="666"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Create the Section&lt;/h2&gt;

&lt;p&gt;Edit a page with &lt;strong&gt;Oxygen&lt;/strong&gt;, e.g., the homepage.&lt;/p&gt;

&lt;p&gt;First, choose the &lt;strong&gt;Section&lt;/strong&gt; component to contain all of the restaurant information. Then, add a &lt;strong&gt;Heading&lt;/strong&gt; element and enter the title.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FiTyWClu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FiTyWClu.png" alt="Add a Heading element to enter the title" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Set a Condition&lt;/h3&gt;

&lt;p&gt;To get all the posts of the &lt;strong&gt;Restaurant&lt;/strong&gt; post type, select the &lt;strong&gt;Repeater&lt;/strong&gt; component. Then, go to the &lt;strong&gt;Query&lt;/strong&gt; section to choose the data source and set conditions.&lt;/p&gt;

&lt;p&gt;Normally, you can choose the &lt;strong&gt;default&lt;/strong&gt; or &lt;strong&gt;custom&lt;/strong&gt; type to get the posts. However, in this case, I only want a specific number of posts to be displayed based on the condition, so I chose the &lt;strong&gt;advanced&lt;/strong&gt; query type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FEdGsVYQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FEdGsVYQ.png" alt="Choose Advanced query type to display specific number of posts" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's create conditions to choose which posts to display. We'll add some query parameters as follows:&lt;/p&gt;

&lt;p&gt;First, add a &lt;code&gt;post_type&lt;/code&gt; parameter to specify that we'll get only posts from the restaurant post type. In the box, as shown in the image below, enter the ID of the post type for which you want to get the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FM1RluBt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FM1RluBt.png" alt="Add a post_type parameter " width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, add another parameter named &lt;code&gt;meta_query&lt;/code&gt;. This aims to choose which posts in the restaurant post type are displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FOP6iU1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FOP6iU1a.png" alt="Add a meta_query parameter" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To limit the number of posts to display in the section, we add the &lt;code&gt;post_per_page&lt;/code&gt; parameter and set the number of posts you want to display.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkuZVzor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkuZVzor.png" alt="Add the post_per_page parameter to limit the number of posts to display" width="800" height="691"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've completed the condition settings. After applying, there are 6 boxes for 6 posts. It's equivalent to the number of posts we set for the section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FAAieadn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FAAieadn.png" alt="There is a box for each post" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Display the Restaurants' Information&lt;/h3&gt;

&lt;p&gt;Now, it's time to display information about each restaurant. In the div that is inside the &lt;strong&gt;Repeater&lt;/strong&gt; component, add an &lt;strong&gt;Image&lt;/strong&gt; component to display the restaurant's image, then connect it with the post's featured image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6jmB9MG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6jmB9MG.png" alt="Add an Image component in the div that is inside the Repeater component" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the voucher information, choose a &lt;strong&gt;Text&lt;/strong&gt; component and connect it to the corresponding field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ft6dXKk0.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Ft6dXKk0.gif" alt="Choose a Text component for the voucher information" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next piece of restaurant information we want to display is the restaurant's logo. Choose an &lt;strong&gt;Image&lt;/strong&gt; component. Because the logo field is created by Meta Box and it returns the &lt;strong&gt;URL&lt;/strong&gt;, go to the &lt;strong&gt;Image URL&lt;/strong&gt; tab to get data from this field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F9WELhe2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F9WELhe2.gif" alt="Choose an Image component for the restaurant's logo" width="1000" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get the restaurant's name automatically, add the &lt;strong&gt;Text&lt;/strong&gt; component and connect it with the post's title.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F3LmuR7n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F3LmuR7n.png" alt="Add the text component to get the restaurant's name" width="800" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the address information, do the same with the &lt;strong&gt;Voucher&lt;/strong&gt; field. Add a &lt;strong&gt;Text&lt;/strong&gt; component, then connect it to the &lt;strong&gt;Address&lt;/strong&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTQfAjAv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTQfAjAv.png" alt="Add a text component " width="800" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all. Now, the information for all of the most viewed restaurants is now available on the homepage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYOfw77V.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYOfw77V.png" alt="All the information of the most viewed restaurants is available" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Style the Section&lt;/h2&gt;

&lt;p&gt;For styling, go back to the page editor with &lt;strong&gt;Oxygen&lt;/strong&gt;. Then, choose each component and change the settings to style them.&lt;/p&gt;

&lt;p&gt;You can also add some CSS in the &lt;strong&gt;Custom CSS&lt;/strong&gt; tab to have a more advanced style.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQfE6Gyt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FQfE6Gyt.png" alt="Add some CSS code" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to the homepage; all the featured restaurants are displayed as we want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F88pjwUb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F88pjwUb.png" alt="The final result " width="800" height="716"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Final Words&lt;/h2&gt;

&lt;p&gt;Through this article, I hope you'll be able to create your own version of the most-viewed restaurants with the help of&lt;strong&gt; Meta Box&lt;/strong&gt; and &lt;strong&gt;Oxygen&lt;/strong&gt;. Just give it a try and provide your findings in the comment section. Best of luck!&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
  </channel>
</rss>
