Tabbed Meta Box in WordPress

I’ve updated the code to use the core WordPress UI. You can find it here.

I recently worked on a project that required me to add a custom meta box with tabs. In the spirit of GPL, I would like to share my code. The sample plugin checks the admin theme used by the user and enqueues the appropriate stylesheet to match the admin look and feel. The meta box looks and works fine with JavaScript disabled.

Download: Tabbed Meta Box in WordPress

Blue Theme with JavaScript Enabled

Fresh Theme with JavaScript Enabled

Meta Box in the side with JavaScipt Enabled

JavaScript Disabled

9 thoughts on “Tabbed Meta Box in WordPress

  1. Oh, Pete, Pete :)

    I was going to build such a solution for two projects I’m working on, and here you come and provide tabbed betaboxes for me. What can I say, except, thank you very much!

  2. Out of curiosity, why did you choose to create a new design rather than use the standard tabs-inside-metaboxes UI (as used in menus, categories, etc) that is the wp standard?

    • I got the inspiration from the WordPress.com stats plugin. I’m hardly a UI developer and that’s why I asked the some of the girls (and a guy) on the UI group for feedback and I’ll be happy to change this. Also, the core tabs for the category meta box don’t degrade gracefully with JavaScrip turned (patch coming).

      • Not ideal, because the dividing line now has no bottom border and just hangs there in space instead of being a boundary, and it breaks the wp style rule. Don’t sneak that into multisite anywhere. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>