Refers to a box-like reusable user-interface component common in the WordPress backend.

learn more… | top users | synonyms (2)

21
votes
2answers
6k views

Create more Meta Boxes as needed

I'd like users to be able to create and remove additional meta box fields as needed. For example, say a music podcast with a variable amount of songs played per episode. The user should be able to ...
14
votes
1answer
8k views

Set Default Admin Screen options & Metabox Order

I am desperately looking for some way (any way) to set default "screen options" and metabox order through the functions.php file. does anyone have any help they can provide here?
14
votes
2answers
4k views

How to show a custom meta box on the “Quick Edit” screen?

I've used add_meta_box() to add a custom meta box to the WordPress edit window on both pages and posts. How can I make this meta box also show on the "Quick Edit" screen? Ideally, I'd like it to ...
11
votes
6answers
8k views

meta_query with meta values as serialize arrays

I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in ...
11
votes
5answers
5k views

Can I add a Category Metabox to attachment?

I am using register_taxonomy_for_object_type() to add the Category taxonomy field to Media uploads (attachments). I'm using this code to do so: add_action('init', 'reg_tax'); function reg_tax() { ...
11
votes
6answers
7k views

Add a Meta Box for uploading a SECOND Featured Image?

I'd like to add a meta box to my posts and page editor that will allow me to upload an image and use it as sort of a SECOND featured image. The idea is that my client will be able to upload an image ...
10
votes
2answers
2k views

Setting admin edit panels & metaboxes positions and visibility for ALL users and admins

My WP 3.3 setup involves several post types and customized edit panels with Advanced Custom Fields plugin (which creates many metaboxes) and other plugins such as SEO metabox panel, Scribu's ...
10
votes
2answers
3k views

Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?

I need to create a custom post meta box(es) for my custom post type "Slideshow" (this post type is already created). Each metabox will hold the content in each slide slide and save it to ...
8
votes
3answers
5k views

Passing error/warning messages from a meta box to “admin_notices”

I have a simple meta box that updates the post custom fields (using update_post_meta()). How can I send a error or warning message to the next page after the user publishes/updates the post and ...
8
votes
2answers
7k views

Custom field/meta populated by dropdown of existing posts?

(My first WP question ever asked! Be gentle!) I'm building a site that is mostly pages (i.e., static), using WP as CMS. At the bottom of several of the pages, there will appear 1, 2, or 3 "promo ...
8
votes
1answer
2k views

Taxonomy dropdown metabox in the back-end

I've created custom taxonomy called Brands and made it hierarchical so I can add Car brands and models there and keep their relations, like this: Ford Mustang Mondeo Focus Problem is, this list ...
8
votes
1answer
2k views

Is there an easy way to make a meta box have the tabs like the Categories meta box has?

My question is pretty much summed up in the title. I'm dropping a meta box in the New Post / Edit Post admin page, and I want to be able to set it up with tabs like the Categories meta box has. I ...
7
votes
2answers
1k views

Multiple Custom Metabox Help

I have been trying to get this worked out for over a year and have tried numerous ways and have not been able to get it to work. I'd really appreciate it if someone could help me with this. Here's ...
7
votes
4answers
7k views

How to set default screen options?

I'd love to be able to hide meta boxes using screen options, instead of removing them or restricting them to user roles, the goal is to just "uncheck" the meta box for the user. I see how this would ...
7
votes
5answers
3k views

WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins

I have multi-author website and I am not very comfortable for allowing all members to enter SEO details in the posts they are publishing. I would like this would be visible only to Administrator of ...
7
votes
6answers
3k views

Disable dragging of meta boxes?

Anyone know how to disable this functionality so the meta boxes can't be repositioned?
7
votes
4answers
7k views

Creating a metabox to upload multiple images

Is it possible to make a meta box that attaches multiple images to a post?
7
votes
2answers
2k views

post formats - how to switch meta boxes when changing format?

Problem After realizing that post formats are pretty popular, but only a extremly rough drawn concept, i see that users will run into possible traps. Post format ... uses post meta fields & ...
7
votes
3answers
4k views

Sample code for validating custom metabox?

I've found very little on this site or in Google searches for examples of validating metabox custom fields. If anyone wants to give examples, here are some cases that would be useful 1) Date entered ...
6
votes
2answers
4k views

How to change default position of WP meta boxes?

Im wondering if there is a way to change the default position of Wordpresses meta boxes such as "featured image" for custom post types without having to drag them manually? Example:
6
votes
1answer
517 views

Best practices for meta box placement?

I was wondering if there were any cut and dry rules to placing meta boxes? I have a meta box for a custom post type for a TV series that holds extra information for said series: when it began airing, ...
6
votes
1answer
2k views

What is the “Advanced” $context in add_meta_box?

In the codex it lists the parameter $context for the add_meta_box as having the following options: normal advanced side What does "advanced" do? I don't see any difference between it and ...
6
votes
7answers
2k views

Individual Widgets per Page

In my (page-only, no posts) Wordpress site I have a number of static blobs in need to put in a sidebar. We could call/tream thoses 'blobs' as widgets. At least they'll have a fixed html content, like ...
6
votes
1answer
2k views

How To Remove The “+ Add New Category” Link From A Category Metabox

Inside of a Wordpress category metabox or any custom taxonomy box for that matter there is a link with the text "+ Add New Category" is there a way this link can be removed preferably without ...
6
votes
1answer
965 views

How to reorder meta box position?

I have a custom post type which have a lot of custom field that categories in meta box. The problem is how do I sorting the meta box in the order that I desired? As I know there is only ...
6
votes
2answers
659 views

How to add a new tab to page editor

Anyone knows how to achieve this? It has something to do with meta boxes, but I just can't figure out the proper syntax.
5
votes
1answer
399 views

How do I position meta_box on post edit screen after the title?

I am displaying a div in the Edit Post screen using add_meta_box(). This function provides very limited positioning options via "priority" and "context" params and these are not sufficient for my ...
5
votes
4answers
2k views

Does Wordpress have a “Form API”

I do most of my development in Drupal, however I am working on a Wordpress site and I need to make a form. Which got me thinking, is there a Form API for wordpress like there is Drupal? Is there a way ...
5
votes
2answers
2k views

How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button

I have a custom post type (called contacts). Since this post type is not working like a post, I don't want to show SAVE DRAFT, PREVIEW, Status, Visibility or Publish Date. The only options I want to ...
5
votes
2answers
2k views

Why won't my metabox data save?

I have a custom post with a lot of meta boxes. I recently tried to add some dynamic metaboxes, using this question: Create more Meta Boxes as needed I managed to get the metaboxes to add nicely, the ...
5
votes
2answers
318 views

Can I force a metabox to be in one column?

Suppose I created a custom metabox for the add/edit post page that uses a wide width (not suitable for being in the sidebar), is there a way of keeping it in the middle column only and sortable while ...
5
votes
3answers
5k views

Custom Post Type - Taxonomy Dropdown Menu?

I have created a custom post type and added various meta boxes/fields to this custom post type. All is working excellent except for one element... Instead of utilizing the default interface for ...
5
votes
1answer
2k views

Action hook on Edit custom post type?

Is there an explicit action hook that will fire when (or just before) the admin Edit page renders for a custom post type? Something similar to {$new_status}_{$post->post_type}? I'm trying to find the ...
5
votes
1answer
124 views

Listen to Post action

I am writing a plugin that adds a custom metabox to the post page. I would like to trigger an event when the user navigates away from the edit post page or when a user stops editing a specific post. ...
5
votes
2answers
2k views

Add the sidebar/widget editor to the post edit screen?

There are (among others) two common ways of customizing the sidebar on an individual post: Create a new sidebar for the post, using code or plugins like Custom sidebars, WP Custom Sidebar, Per Page ...
5
votes
1answer
2k views

Put the media uploader in a metabox

I find it very unnecessary to have an "add image" button that brings me to yet another screen that will let me upload content to my post. Ideally I would like to have a meta box with the option to ...
5
votes
2answers
457 views

Meta Boxes: 'admin_init' or 'add_meta_boxes' hook?

When setting up meta boxes in a custom post type I've been do so using the add_meta_boxes hook, e.g. add_action('add_meta_boxes', 'meta_box_setup'); function meta_box_setup() { add_meta_box( ...
5
votes
2answers
1k views

Get List of Registered Meta Boxes and Removing Them

Is there a function for getting a list of registered Meta Boxes and removing them? I see there is a method for adding, and removing. http://codex.wordpress.org/Function_Reference/remove_meta_box ...
5
votes
1answer
1k views

How can I create a taxonomy meta-box with search suggestions but no new terms input?

I was wondering how I could setup a taxonomy metabox on a post edit page that would be similar to the "tags" kind (with search field and automatic suggestions), but without the right to add a new ...
5
votes
3answers
353 views

Add default WordPress tag meta box to User Profile

I've set up my user profiles to allow custom taxonomies following this tutorial. Ideally, I'd like to use the default Tag meta box from the Post screen, so users can easily add new taxonomies and ...
4
votes
3answers
4k views

How can I put a custom meta box above the editor but below the title section on the edit post page?

I have a custom meta box for a custom post type that my client wants placed between the title/permalink section and the post editor in the admin panel. Is this possible and if so is there a ...
4
votes
4answers
1k views

add meta box - custom field : which to choose?

i've just find out about the custom field, which makes it possible to add something near a post, but what is the difference between "add_meta_box" and "custom field"? Custom field is inside the ...
4
votes
3answers
3k views

Make Custom Metaboxes Collapse by Default

I've created some custom metaboxes for my post write screen. Is there any way to make some of them display collapsed by default? Just in case I'm not using the correct terms or not being clear in ...
4
votes
1answer
484 views

What is the index [0] for on post meta fields?

Trying to improve my PHP knowledge through test and try! I am confused on [0] arguments at following WordPress PHP code global $post; $custom = get_post_custom($post->ID); $price = ...
4
votes
2answers
1k views

How to add a class to meta box

When adding a metabox, i.e.: add_meta_box( 'metabox_id', 'Metabox Title', 'my_metabox_callback', 'page', 'normal', 'low', array( 'foo' => $var1, 'bar' => $var2) ); ...
4
votes
2answers
549 views

How to Add Reminders/Notes to New Post Meta Boxes

I have a multi-author website and I use the WyPiekacz plugin to require that authors add 1-5 tags, select only a single category, and include a featured image (and require minimum dimensions for the ...
4
votes
3answers
2k views

Change The Title Of a Meta Box

I'm trying to create a function that would allow me to change the title of an established meta box (i.e, change Meta Box title 'Authors' to 'Team', etc.) I didn't want to use JS or have to unset the ...
4
votes
3answers
8k views

The correct way of adding TinyMCE editor to custom meta box textarea?

Since Wp 3.2 a lot of changed to TinyMCE and Wordpress and ow I can not find out how to add the Tiny MCE to meta box in Page. This is how it looks when I am not firing up the MCE ...
4
votes
3answers
2k views

Removing Metabox for “Slug” without removing functionality

Here is an interesting question. I have recently noticed that if you utilize the code remove_meta_box('slugdiv', 'post', 'normal'); you are actually unable to modify the slug when you click on ...
4
votes
1answer
256 views

Adding another state (spam, reject, approve) to wordpress comments?

i know this might sound a bit weird, but what I'm trying to do is rather simple in mind but may be technically difficult. I'm running small contests on my wordpress site where I ask users to leave a ...