Why is Meta Box a recommended plugin for managing fields in WordPress?

|
8 mins reading time

Recently, the WordPress community was shaken by a major conflict between WordPress and WP Engine, leaving many surprised and questioning the direction of these two giants. This conflict not only impacted WP Engine’s hosting services but also extended to the blocking of the related ACF plugin and its ban from the WordPress.org directory. This means users within the WP Engine system may no longer have access to updates or support from WordPress.

One interesting option is the Meta Box plugin, which effectively and flexibly manages fields. In this article, we’ll introduce you to Meta Box, exploring its features and why it has become a popular plugin frequently discussed lately.

Differences between ACF vs META BOX

The ACF (Advanced Custom Fields) plugin Pro version comes with a variety of basic capabilities, such as managing Options Pages, fields, and Post Types, allowing users to get started immediately.

Meta Box is designed as a modular system, requiring the installation of the free version first. If additional capabilities are needed, supplementary extensions must be installed. This design ensures the plugin remains lightweight and loads quickly, as it only loads the functions necessary for use.

Meta Box offers various extensions to enhance its capabilities, categorized as follows:

DataUIAdminFrontend
MB Blocks,
MB Custom Table
MB Revision
MB Settings Page
MB Term Meta
MB User Meta
MB User Profile
Meta Box Geolocation
Meta Box Group
Meta Box Template
MB Admin Columns
MB Blocks
MB Frontend Submission
MB User Profile
MB Views, Meta Box Builder
Meta Box Columns
Meta Box Conditional Logic
Meta Box Group
Meta Box Include Exclude
Meta Box Show Hide
Meta Box Tabs
Meta Box Template
Meta Box Tooltip
MB Admin Columns
MB Blocks
MB Revision
MB Settings Page
Meta Box Builder
Meta Box Template
MB Frontend Submission
MB User Profile
MB Views

Let’s take a look at some examples of the capabilities in each extension to see which ones are interesting.

Meta Box AIO

Meta Box AIO – Combines the capabilities of all extensions.

This plugin requires installing the free version first before using the AIO version. The AIO version consolidates the capabilities of all extensions and allows you to manage them by enabling or disabling specific extensions. It will only function based on the extensions you have activated.

Meta Box Builder – Used for creating fields.

This extension serves as the primary tool for creating fields, equivalent to the Pro version of ACF. It provides the capability to create various fields for the desired Post Types, Taxonomies, Users, and Settings, with a set of basic fields included.

Meta Box Builder – Basic Fields
Meta Box Builder – Fields and Ready-to-Use Code

The interface is quite similar to ACF, so anyone who has used ACF before should find it easy to learn. However, the features are not as comprehensive as ACF Pro and require additional extensions for full functionality. There is also ready-to-use code available for integration into your theme.

Meta Box Builder – Settings Page

The settings provided allow you to specify the location for display within a specific post type, the position where it will be shown, and the style to be applied.

Meta Box Builder – Fields Displayed in Post

Meta Box Group – Groups fields together.

The original Meta Box Template does not have the capability to create field groups for easier querying. Additionally, it supports repeater functionality by simply ticking the “cloneable” checkbox.

Meta Box Group – Grouping Fields and Usage

MB Admin Column – Adds fields to the Admin list view.

Normally, when using ACF, users need to write their own code to display fields in the list view. However, Meta Box provides an extension for this functionality. By enabling the MB Admin Column extension, a button will appear, as shown in the example.

Meta Box Group – Field Grouping and Usage
Meta Box Admin – When Checked, It Will Display as Follows

MB Custom Table – Creates new tables for better performance.

This feature can be considered a true game changer for this plugin. Normally, WordPress stores meta data in a vertical structure. The advantage of this approach is its flexibility, allowing you to easily add, remove, or expand fields as needed. However, as the number of fields increases, it significantly impacts website performance and speed.

Example
For one post with 20 meta rows, if the website has 100,000 posts, the post_meta table would grow to 100,000 x 20 = 2,000,000 rows.

This extension allows you to create a custom table with columns corresponding to your meta data. By storing data horizontally, one post with 20 meta fields would use just one row in the custom table. For 100,000 posts, the table would contain only 100,000 rows. This improves performance by up to 20 times.

Follow the steps shown in the image below to implement this feature.

MB Custom Table – Enabling the Extension Will Display Fields
MB Custom Table – Define Table Name and Enable Automatic Table Creation
MB Custom Table – Using wp_postmeta Stores Data Vertically
MB Custom Table – Data Stored Horizontally in Custom Tables

The downside of using automatic creation is that all column types will default to TEXT. If you need to customize the column types, as well as set keys or indexes, you can create the table manually. Meta Box provides helpers to assist with this process, making it easier to implement custom configurations. Link

MB Custom Table – Retrieving the data

The method of usage differs slightly, requiring the table name to be specified in the second parameter.

For a more advanced approach, you can create a new model using Meta Box’s API. This process is similar to creating a new Post Type but avoids using the wp_posts or wp_postmeta tables. Instead, it creates a dedicated table to store data exclusively in that table. This approach significantly boosts performance. If you’re interested, you can explore more about it here

MB User Profile – Creates forms for login, registration, and profile editing.

This feature allows you to create forms for Login, Register, and Edit Profile. It provides ready-to-use shortcodes and Gutenberg components, making it easy to integrate and customize within your WordPress site.

MB User Profile – Gutenberg Component

To use the Edit Profile form, you need to link the Field Group ID to the Form ID in Gutenberg for it to work. You can add any custom fields you need. For example, if you want the form to allow password changes, you can create a password field and link its ID accordingly.

The first_name and last_name fields are default fields provided by WordPress. When you create these fields and link their IDs, the form will automatically fetch the existing values and allow users to update them seamlessly.

MB User Profile – Setting Up Field Group ID and Field ID
MB User Profile – Linking IDs
MB User Profile – Display Pages

Conclusion

Meta Box offers a wide variety of extensions, which can be overwhelming for beginners who haven’t tried using it or read the documentation. Fortunately, the plugin provides code examples and usage guides for each field.

Once you become proficient, Meta Box will undoubtedly prove to be a powerful plugin for field management. The modular design, separating features into extensions, ensures the backend loads quickly and efficiently. here

Designil PDPA Banner Thai Woo AIO Banner

author - aum watcharapon
Aum Watcharapon
👨🏻‍💻 WordPress Expertiser

Subscribe to newsletter

doaction will send notifications when new articles are available on the website, and you can unsubscribe at any time.

More Articles

Transform WordPress into a Backend with the Power of REST API

WordPress is not just a website creation system or content management tool, but also features an API that extends its capabilities for development and integration with other systems. Whether you want to build applications or connect with various services, WordPress API can help you. This article will introduce you to WordPress API and how to make the most of it.

Read more

How to Use Gutenberg Without Breaking Your Website Using Overrides Pattern

Currently, Gutenberg has evolved to fully support Full Site Editing (FSE), allowing users to edit various parts of the website, from the header and footer to other components on the page, without needing extensive themes or additional coding. Furthermore, the blocks offer a variety of customization features, providing flexible design options. However, a common issue faced by developers and users is accidental errors during edits or customizations (e.g., unintentionally changing components or layouts), which can damage or “break” the website structure. To address this issue, WordPress, starting from version 6.6, has introduced a new feature called Overrides Pattern, which helps prevent edits that could affect the functionality of various components. What is a Pattern? A Pattern in WordPress is a set of multiple blocks grouped together to form a predefined structure or template, similar to […]

Read more

If you have any questions or need advice about WordPress, feel free to ask.

Office

  • © do action co., ltd. 2024
    66 Soi Petchkasem 98/1, Petchkasem Road,
    Bangkhae Nuea, Bangkhae,
    Bangkok, Thailand
    10160
PDPA Icon

Our website uses cookies to enhance your user experience.

Privacy Preferences

คุณสามารถเลือกการตั้งค่าคุกกี้โดยเปิด/ปิด คุกกี้ในแต่ละประเภทได้ตามความต้องการ ยกเว้น คุกกี้ที่จำเป็น

Allow All
Manage Consent Preferences
  • Always Active

Save