ButterBean Post Meta Box Framework Now in Beta

photo credit: School and community nutrition program in Madagascar - (license)
photo credit: School and community nutrition program in Madagascar(license)

Justin Tadlock announced this week that his new ButterBean post meta box framework is now in beta. The framework is object-oriented and built on Backbone.js and Underscore.js.

Although the WordPress development community has already produced several post meta frameworks, ButterBean was created for a very specific use case: custom post types with lots of custom meta.

“It’s designed specifically for situations where you have a lot of metadata attached to a post and need to present the fields in a usable manner without the user having to scroll all over the page to find the field they need,” Tadlock said. If you just need a handful of fields, ButterBean is not the solution.

“I’m fully aware of existing solutions like CMB2 and ACF,” Tadlock said on the framework’s description page. “I’m sure those are useful for some folks and will definitely have more features than ButterBean ever will. I just want something simple that I can drop into my own plugins.”

butterbean-example

The project grew out of Tadlock’s work on his Custom Content Portfolio plugin and his desire to learn a JavaScript framework. He modeled ButterBean after the WordPress Customize API but notes that the framework only uses Underscore.js templates as opposed to using PHP for output.

“Using JavaScript templates makes a lot more sense when you have advanced controls that need to render templates on the fly with updated data,” he said.

ButterBean is available as a standalone plugin but can also be dropped inside a plugin. Developers who want to test the beta and offer feedback can find basic documentation on the project’s homepage. The framework’s code is available on GitHub along with an example plugin.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

8 Comments


  1. Damn, this looks awesome! I was waiting for something like this to come along.

    The UI reminds me of the metabox that WooCommerce uses for product details which I’ve always found to be very neat.

    Hopefully this remains maintained and gets updated to be compatible with the Fields API when/if that gets released in the future.

    Report


    1. It’ll have to be maintained because I’m using it in three of my own plugins. I plan to use it in other plugins as well. The whole point of me separating it into its own project was to have a single source project to pull into my plugins that require it.

      Report


      1. Awesome Justin! I’ve always been a fan of your work. Will definitely be using this on an upcoming project.

        Report

Comments are closed.