toggle custom fields based on some values

Meta Box Conditional Logic

The Meta Box Conditional Logic extension lets you show fields precisely when you want to and not a second sooner.

The extension provides a variety of visibility options for meta boxes, fields and HTML elements that help you control the organization of your page-editing experience.

Welcome to the World of Tomorrow

Imagine a back end where all custom fields existed on all pages all the time, and somehow, you had to just know which ones to use and when. Everything would be separated and you would have to write hefty functions to connect information behind the scenes.

Fortunately, we live in a better world with better back ends. Lucky you!

With the Conditional Logic extension, developers can control the relationship between fields and powerfully create connections to maximize the efficiency of the process.

Conditional Logic: Now You See It, Now You Don’t

As a developer, you get to lay out the rules of a website and determine what can be seen and when.

The MetaBox Conditional Logic extension lets you extend this power to WordPress to both show and hide fields instantly based on the data that’s dynamically entered on the page.

Not Your Grandma’s Conditional Logic

Do you remember that classic Dominoes game? You line up several tiles and when you knock the first one down, it triggers a chain reaction. Down they all go.

But, what if you decided to knock one of the middle tiles down first? What a twist!

The chain reaction would change dramatically and so would your childhood. Okay, maybe not, but your site’s meta boxes and custom fields would certainly benefit from this kind of change.

Similar to Dominoes, you can set up a similar chain reaction in an infinite amount of ways with your site’s custom fields and meta boxes using Meta Box Conditional Logic.

You can set extra options and fields to dynamically and instantly appear after a specific, desired part of your form is filled out by a user.

Show or hide extra options when you want to in your forms with conditional logic.
Show or hide extra options when you want to in your forms with conditional logic.

Choose Your Own Conditional Logic Adventure

If a meta box doesn’t apply to a particular page template or post category, you can remove it all together for a polished user experience.

You’ll also get to tailor any page you want with exactly the fields you need.

Decluttering for Developers

While you’re already reducing clutter on your site, why not remove default WordPress elements that don’t apply to the page or post you’re editing?

Remove the “Tag” meta box or even the “Publish” section from an editing page to match form to function.

Conditional Doesn’t Have to Mean Complex

The conditional logic rules to show or hide elements range from super simple to the intricately complex and everything in between.

It’s conditional logic just the way you want it, when you want it. It’s everything you have always wanted to do, done for you, and ready for you to customize and control.

Try this on for size: you can check fields with comparison operators such as = and != but also if a field contains a specific word, phrase or is between, say, a range of dates.

You can even layer multiple conditions on top of each other for a compound statement of extra-specific conditional logic.

Show or hide whatever you want – meta boxes, elements, sections – oh my!
Show or hide whatever you want – meta boxes, elements, sections – oh my!

Top Features:

  • Capability to set the visibility of these key objects:
    • Meta boxes registered with the Meta Box plugin or WordPress core meta boxes
    • Custom fields registered with the Meta Box plugin
    • Any DOM / HTML element such as the Publish or Tags modules
    • An extensive selection of operators to choose from for your conditions: =, >=, <=, contains, in, starts with, ends with, and between. All of them can combine with the Not operator to make a negation (See the documentation for list of conditions.)
  • Works seamlessly with entire fields’ included Group
  • Ability to set the visibility condition according to other fields’ values, categories, post format, post title and all other form elements
  • Clean and easy-to-understand syntax

Help! Somebody Get Me a Doc!

No matter the injured code or headache-inducing error, we’ve been there, and we’ve felt the pain.

That’s why we’ve come to the rescue with our extensive, comprehensive documentation on the Meta Box Conditional extension as well as anything else Meta Box.

And we don’t just talk the talk. Our expert support team is ready to take on any problem you throw at them over in our Support Forums so we can get you back to winning the internet.

group and repeater fields for wordpress custom fields

Meta Box Group

Save time and energy with Meta Box Group by organizing custom fields into repeatable and collapsible, well, groups. Stack similar fields together into a fully customizable and visually-stunning hierarchy.

Make room for well-organized meta boxes and custom fields in forms, pages, posts and infinitely more with the Meta Box Group extension.

Manage Data with Pure Efficiency

With all the data that exists on a website, organization can be chaotic. Grouping repeated custom fields together is an easy way to help developers and end users view and manage data with pure efficiency.

Meta Box Group - Group any fields you want into repeatable and collapsible groups.
Group any fields you want into repeatable and collapsible groups.

Clone Groups like No Other

Repeating groups of custom fields just got easier.

Organize meta boxes and custom fields like no other by placing them into clusters based on categories, content similarities, location on the page or whatever way you want.

Then, you can repeat each group, its sub-fields and sub-groups as many times as you want in one-click with Meta Box Group’s cloning feature which isn’t available in any other custom field plugin.

You can also drag and drop the repeated groups to reorder them right on the post or page.

Top Features:

  • Organizes custom fields into groups for improved UI, UX and data structures
  • Unlimited repeatable groups with the exclusive cloning feature
  • Effortless reordering with clone sorting option
  • Supports nested and multi-level nested groups
  • Groups are collapsible for easy viewing and visual prioritization
  • Database optimization of sub-fields for reduced bloat

Multi-Level Nested Groups

Meta Box Group supports multi-level nested groups with no limits for nesting levels.

All groups, sub-groups and fields can be repeated in one click.

Multi-nesting allows you to create a more specific data structure on the page. It also opens up the opportunity to add more data to your posts and post types without having to finagle more fields in your code.

You can create multi-level nested groups and clone whatever needs repeating.

Tweak and Toggle

Unwieldy screens are a menace. Collapse away the clutter by toggling those sub-fields in a group. If they’re too long, you can control your content and collapse or expand sections, as needed.

With the Meta Box Group extension you can also number your group titles, set the group title to a sub-field value as well as save the collapsible or expandable state.

A Lean, Mean Database Machine

It’s not just structural – the Meta Box Group extension can rework your site’s database to help bring its efficiency and performance level to an all-time high.

WordPress is great at allowing unlimited data and data types whenever users need a solution. Storing multiple custom fields in WordPress, however, can result in a disorganized jumble of meta tables.

Meta Box Group can help streamline database organization to increase website performance.

Instead of storing each sub-field in its own individual meta table, the extension puts all sub-fields into a single row, reducing the number of rows in a table as well as letting the website access the database more efficiently.

Getting Fancy

After organizing your custom fields, display them just as clearly.

By default, Meta Box Group displays fields vertically, like typical fields. But, you can incorporate Meta Box Group with Meta Box Columns to arrange repeated fields horizontally as columns in a grid for ultimate visual clarity.

Meta Box Group with Columns
Structure your meta boxes with clean lines by also using the Meta Box Columns extension.

To Group or Not to Group?

When you’re trying to organize hierarchical information that repeats itself, visual cues are super important, not only for you, but for possible clients.

Check out the examples below for details on how Meta Box Group can be.

The Taming of the Shrewd Book Details

Meta Box Group can be used to display publisher data about a book from the book’s format, and publication date to the author’s name and biography or any other details you want to include.

You can also repeat this structure for as many books as you want with Meta Box Group’s exclusive cloning feature.

Each book can have its own title, cover image, and publisher, with the option to edit and add more authors.

Meta Box Group Book Example
Use Meta Box Group to display a variety of information in a single organized place.

Music to My Ears

You can create a music album complete with playable tracks, titles and any other details you want repeated right on your website with Meta Box Group.

To make it happen, create an album custom post type with each track structured to display information similar to the example above. The repeat function makes cloning details simple.

The drag-and-drop feature is helpful for rearranging tracks and the collapsible elements helps you visually organize your repeat custom fields while you’re working.

Meta Box Group Album Example
Add as many elements as you need with the repeat feature.

Need to See a Doc? We’ve Got Loads

Sick and tired of being stuck troubleshooting on your own?

We get it.

That’s why we have tons of comprehensive documentation on every aspect of Meta Box Group extension and everything else Meta Box. Plus, our expert support team is ready to get you through it all so you can get everything you need done with Meta Box and in a flash to boot.

Create WordPress custom fields

Meta Box Builder

Use the Meta Box Builder extension to expand the Meta Box plugin, and drag and drop your way to creating the custom meta boxes and custom fields in WordPress you want without any of the hassle.

Create everything you need without limitations and without having to touch a single line of code.

Perfect for Everyone

Whether you have no previous coding experience or you’re a developer who’s tired of the grind, this extension is for you.

Drag any of 40+ field types into your own arrangement and customize them to your heart’s content.

Meta Box Builder Interface
Meta Box Builder has a drag-and-drop interface that’s uncomplicated and effortless.

Top Features:

  • Designer-friendly with no coding knowledge required
  • Lightweight, easy to use and blazing fast
  • Every built-in Meta Box field and parameter is supported
  • Fully compatible with all Meta Box extensions
  • Priority, context and conditional logic configuration options
  • Create any custom field parameters using Custom Attributes
  • Import or export meta boxes and fields
  • Ability to export the configuration to PHP code

Ready, Set, Go!

If you can create a menu in your WordPress admin dashboard, you already know how to create a Meta Box.

Use the drag-and-drop interface to arrange meta boxes in a flash and just the way you want. Then, have the results automatically ready to display on the front end just like a WordPress menu.

All other tasks like developing the meta boxes and fields, and registering or integrating them are automatically taken care of for you so you don’t have to lift a finger.

Custom Field Settings
Customize a field by selecting it to access a ton of options. No coding required.

Simply Straightforward

No need to fret over how to customize where (and when!) your meta boxes are displayed.

You can set priorities, context and conditional logic for each meta box and field so they only show up on the page at the exact time and place you want.

With all the options available from the WordPress admin, you have ultimate and precise control over your meta boxes and custom fields—all without writing a single line of code to boot.

Control meta box location
Select where to put your meta boxes and when they should appear or hide.

Take the PHP and Run

It’s a lightweight option for developing meta boxes and custom fields with none of the effort.

There’s no need for code here because it’s already all done.

If you want to take it up a notch and create a ridiculously lightweight option, Meta Box Builder generates custom code for you instantly as you create what you need. Whenever you’re ready, you can export everything and run with it. It’s as quick as copying all that automagically created custom code Ctrl + C or ⌘ + C style.

Once that’s done, you can add them to any other WordPress website by pasting the custom exported code into the child theme’s functions.php file.

You don’t need to have the Meta Box Builder extension enabled on the new site—just the ultra lightweight Meta Box plugin which is free from settings and admin pages so you won’t even notice it’s there.

That also means you can import your meta boxes and custom fields to as many WordPress sites as you want. Whether you want them all to have the same fields and settings or something completely custom is entirely up to you.

Export custom fields code
With every change you make, custom code is generated so you can optionally export it.

Explore and Create More

Meta Box Builder plays nicely with all Meta Box extensions.

You can also team up Meta Box Builder with the free Custom Post Type extension to create custom post types and custom taxonomies as well as manage all of the data on your website without creating or manipulating any code whatsoever.

Creating custom post types with MB Custom Post Type extension
Creating custom post types with MB Custom Post Type extension

Don’t Panic! We’ve Got Your Back

There’s no need to worry if you can’t make a go at making Meta Box Builder work. We know how frustrating that can be.

So, we create expansive documentation on Meta Box Builder as well as all the things. Our expert support team is also on hand in case all hell breaks loose and documentation just won’t cut it because we’ve got your back. And front.

write custom fields in yaml

Meta Box Template

Meta Box Template is a beginner-friendly extension for the Meta Box plugin which allows you to create custom meta boxes and custom fields in the WordPress edit page using an easy-to-read template without touching code.

Version 0.2 – Supports read config from external file

The plugin uses YAML syntax to helps you define the meta boxes and custom fields easily. The YAML syntax is very popular in the information technology field, just like JSON, because it allows us to define complex data in a readable format.

You can use YAML to define as many meta boxes as you want with any kind of custom fields inside. It supports all the configuration for meta box and for custom fields. Using this extension, you are transforming from writing PHP array for meta boxes to writing a readable YAML text. If you’re new to YAML, then you should check it out. It’s very easy to use and easy to understand.

Besides, Meta Box Template opens an ability for you to copy the meta boxes from one website to another without moving code. Just copy the template and save it somewhere. Then paste into the destination website. And all your meta boxes and custom fields appear!

Features:

  • Changes custom fields names and parameters anytime you want.
  • Copies the template to reuse it in other websites.
  • Supports YAML syntax which offers easy-to-read configuration for template.
  • Supports all parameters of meta box and custom fields.
  • Easy to use and runs fast.

Screenshots:

add tooltips to meta box fields

Meta Box Tooltip

Meta Box Tooltip is an extension for Meta Box plugin, which adds tooltips to your custom fields. When users move the mouse over the icon, it will show custom help information for the field. The tooltip can be added to the field label or input.

Display custom text in tooltip

Meta Box Tooltip is a quick way to provide help information for elements. And can help users understand and use / interact with elements in the page more efficiently, such as improving the usability of your page.

The plugin supports all the icons from Dashicons (the default icon font for WordPress admin area). Besides, you can use your own icon by providing a custom URL. You can also set the tooltip position to top, left, right or bottom.

Since version 1.1, you also can add tooltip to field input as well. Previously, you can add the tooltip to only the field label. This feature might make your meta box look better in some situation.

 

Features:

  • Supports all Dashicons
  • Custom icon by providing URL to icon image.
  • 4 positions of tooltip: left, right, top, bottom
  • Supports tooltip in field label or field input
  • Easy to adjust old code to add tooltip to meta fields
  • Easily integrate with themes

Screenshots:

Display custom text in tooltip
Display custom text in tooltip
Show or hide meta boxes conditionally

Meta Box Show Hide

Meta Box Show Hide is an extension for the Meta Box plugin, which helps developers to show/hide meta boxes by page template, post format, category or custom taxonomy. This extension uses JavaScript to show/hide elements immediately and can combine conditions (include, exclude, logical operator AND, OR) to create as many restrictions as you want.

Developers  don’t need to rewrite any meta box definitions. Just add conditions for meta boxes for where to show or hide them, then other works will be done automatically. And no need to get stuck with writing custom PHP to check.

Please note that this extension works with meta boxes, meaning it doesn’t show / hide custom fields or elements based on some rules. If you need that, or need more complex condition, please check the Meta Box Conditional Logic.

Important: Since version 1.1.0, the plugin supports Gutenberg, the new block editor in WordPress 5.0. However, since Gutenberg has some limitations, the plugin only supports template and post_format rules. Since version 1.3.0, we have fully added compatibility with Gutenberg. Now all rules are working properly in both classic editor and Gutenberg editor.

Features:

  • Works in both classic editor and Gutenberg (block editor)
  • Allows developers to show or hide meta boxes under conditions
  • Can combine conditions using logical operator AND, OR
  • Conditions (show/hide by):
    • Page templates
    • Post formats
    • Categories
    • Custom taxonomies (hierarchy taxonomies only)
    • Parent page
    • Input values, for example: show a meta box when selecting a value from dropdown, hide a meta box when checking a checkbox, etc.
organize custom fields in columns

Meta Box Columns

Meta Box Columns is an extension of the Meta Box plugin which can reorganize fields by putting them in the same row aiming to have a better layout, and see/add information easier. It supports to organize fields in a 12-column grid with ease.

Meta Box Columns
Meta Box Columns Screenshot

When developers register multiple fields in a meta box (such as information about an artist or a person), listing every field one by one down the side might be boring. This makes the edit page too long and hard to see the overview. The Meta Box Columns can help you to make it organized and clear by putting the fields into a 12-columns grid. This shortens a lot the edit form and lets you see all the information immediately without scrolling down.

To improve the UI of the form, please consider using this extension with the Meta Box Tabs extension. It helps you organize custom fields into tabs. Both plugins work nicely together.

Features:

  • Supports 12-columns grid
  • Easy to adjust old code to add columns to meta boxes
  • Feasibly integrate with themes

Screenshots:

organize wordpress custom fields in tabs

Meta Box Tabs

Meta Box Tabs is an extension for the Meta Box plugin, which allows you to organize custom fields in tabs. The extension supports 3 tab styles with the same UI as in the WordPress admin area. Developers can set it up easily, organize custom fields in meta box better, satisfy the clients in a more user-friendly way.

Meta Box Tabs Left and Icon
Version 0.1.1, support tab style Left and Tab Icon

No more re-coding for meta boxes. Your only work is adding more parameters for tabs such as tabs’ titles and where each field belongs to. In this way, the UI is really clear and the clients can understand easily.

Tabs can have icons. The extension supports all the icons from Dashicons (the default icon font for WordPress admin area). Besides, you can use any icon font or images if you want.

To make everything smooth, we use the same UI as in the WordPress admin area. This makes sure there’s nothing surprisingly appears in your edit pages.

Tabs can be on top or on the left (similar to what WooCommerce does). You can also remove the meta box wrapper to make the tabs look better (see screenshot below).

If you need more way to control how the custom fields are organized, please consider using Meta Box Columns. It allows you to put fields in a 12-columns grid. Both plugin works well together.

Features:

  • Uses default WordPress tab styles
  • Supports 3 styles of tabs (see screenshots for the demo)
  • Supports tab icon, use Dashicons by default but you can use any icon font or images for icon
  • Easy to adjust old code to add tabs to meta boxes
  • Easily integrate with themes
  • Ability to remove the wrapper of meta boxes in WordPress, making the tabs look more professional (see screenshot).

Screenshots:

include exclude wordpress meta boxes for specific pages, templates, categories

Meta Box Include Exclude

Meta Box Include Exclude is an extension for the Meta Box plugin, which helps developers to show/hide meta boxes only in some pages conditionally by post ID, page template, category, tag or custom taxonomy. Developers can combine conditions to create as many restrictions as they want. They can also write a custom function to check whether or not show the meta box.

There are many situations where you need to control which page a meta box appears on. For example, you create a meta box for the Contact Us page template only or for posts under News category. And each post under these conditions has specific metadata and thus, specific meta box for configuration. On other pages, you don’t want users to see it. So, in this case, the extension can help you do that easily.

There are many rules you can define for your meta boxes such as: post ID, page template, taxonomies, user roles, etc. These rules can be combined to achieve more complex conditions. If there is no rule you want, you can write your own custom conditional function.

Note: This extension shows/hides meta boxes when page loads or after saving. It does not include JavaScript code to toggle meta boxes immediately when conditions changed. For that purpose, please see the Meta Box Show Hide or Meta Box Conditional Logic extensions.

Features:

  • Allows to show (include) or hide (exclude) meta boxes under conditions
  • Can combine conditions using logical operator AND, OR
  • Conditions (show/hide by):
    • Post IDs
    • Parent IDs
    • Post slugs
    • Page Templates
    • Categories, tags or custom taxonomies
    • Parent categories, tags or custom taxonomies
    • User roles (works with MB User Meta extension)
    • User IDs (works with MB User Meta extension)
    • Custom function

Screenshot:

Meta Box Include Exclude
Meta Box Include Exclude Screenshot