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

learn more… | top users | synonyms (2)

1
vote
2answers
1k views

How To Create a Meta Box with Html Content with Instructions to Site Editors When Editing a Post or Page?

I would like to add a custom Meta Box with Html content in the screens New and Edit Posts/Pages (/wp-admin/post.php?post=POST_ID&action=edit), so that I could display a list of editorial ...
1
vote
3answers
2k views

How to add meta box to backend menu page

I need to add a meta box to the backend menu page, in Appearance->Menus (/wp-admin/nav-menus.php), to list all the available post types, both the defaults & the custom ones. It will contain a ...
1
vote
2answers
1k views

Unable to save custom taxonomy terms in a custom-built metabox

I've roughly followed the tutorial here on how to create "custom taxonomy input panels". I'm using a custom post type of homes and a custom taxonomy called beds (used to record the number of beds in a ...
0
votes
1answer
81 views

Metabox radio buttons not saving correctly

I have multiple radio buttons set up inside of a metabox in a custom post type. I have created the metabox like so: add_action('admin_init', 'add_meta_boxes', 1); function add_meta_boxes() { ...
0
votes
1answer
291 views

Custom field values get deleted

I created a custom post type:products which also has custom fields: price & shipping. Occasionally, if I leave the edit product window open or refresh it, I lose the values inside price and ...
2
votes
2answers
346 views

Only show metabox when date-value in other metabox is over?

probably a weird question. I'm using the custom MetaBox and CustomFields Class by jaredatch on Github. I have this "event-date" metabox: $meta_boxes[] = array( 'id' => ...
1
vote
1answer
621 views

Save selected item from dropdown menu in a meta box as a metadata value for a custom post type

I have been beating my brains on this one for days now and my Google-fu is failing me. I have created a custom meta box with a dropdown menu that lists all of the terms from a custom taxonomy. What I ...
1
vote
2answers
429 views

Undefined index: at_nonce in custom post metabox

I'm getting this error with my custom post metabox. The custom post and metabox works fine, but if i have debug on and when i try to save any other page or post, i will get an error: Notice: ...
0
votes
1answer
370 views

Checkbox in post not saving value

I have a checkbox above my metabox in a custom post. When I check it and publish/update the post, it become unchecked again meaning it's not saving it's value. Here is my code for the checkbox: ...
0
votes
3answers
681 views

How to select one major category (or custom taxonomy) for a custom post type?

I've created a hierarchical custom taxonomy (genre) and want to use it for a custom post type (radio station). But I don't only want to assign some genres to a radio station. I also want to be able to ...
0
votes
1answer
7k views

How to get meta box values - WP tuts tutorial

I did these tree tutorials to create custom metaboxes. wp.tutsplus.com/tutorials/reusable-custom-meta-boxes-part-1-intro-and-basic-fields/ ...
0
votes
2answers
1k views

Can I limit this meta box to a particular page?

I am using a version of this (http://www.deluxeblogtips.com/meta-box-script-for-wordpress/) meta box script but I want to be able to limit which edit screen a meta box shows. For example, if I only ...
3
votes
3answers
3k views

Meta Boxes in Front End Post Submission Form

How can I add meta boxes to the front end post submission form? Similar to front end post submission that creates new posts, the form replies should go directly into the post meta boxes. Meta Boxes ...
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 ...
1
vote
1answer
3k views

Custom post type metabox array

I am trying to create a custom post type with custom metabox array. How can I create this kind a automatic populating post type? I think I have to use two dimension array. But how can I automatically ...
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 ...
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?
2
votes
2answers
2k views

Possible to limit custom meta boxes depending on what page template is used?

Ive searched around and havent been able to find anything regarding using a specific "template" as a target to trigger when to show custom meta boxes...Is this possible, and if so how would you script ...
3
votes
2answers
972 views

How to force one column layout on custom post type edit page?

I've created a plugin using custom post types and I need to force the default two column post page to a single column. At the same time, the Publish metabox must move to the bottom. I need to do this ...
3
votes
4answers
1k views

Do I need a nonce field for every meta box I add to my custom post type admin?

I'm currently working on the admin page of my custom post type, and I got stuck on deciding whether to add a nonce field again for the second metabox or not. I'm very new to custom post types, and ...
1
vote
1answer
453 views

Changing the priority of a custom taxonomy's metabox

I'm creating a new custom taxonomy (not a custom post type). On the edit post page, this custom taxonomy is showing up above all of my other meta boxes. I'd like it to sink down lower in the group. ...
1
vote
1answer
2k views

How do I stop HTML entities in a custom meta box from being un-htmlentitied?

I have a custom meta box that is supposed to accept HTML, but the text I'm trying to input contains both double and single quotes (and ampersands), and it's messing up the saved data - each time I ...
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 ...
4
votes
4answers
983 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 ...
3
votes
1answer
639 views

Formatting custom meta box date from YYYY/MM/DD to a more readable alternative

QUESTION This is following a previous question that was graciously answered by Milo earlier here - How to sort CPT by custom meta value (date), and return posts month by month In short, I'm having ...
3
votes
2answers
6k views

Post custom metabox textarea using wp_editor

I'm a novice and looking to add the wp_editor to a custom metabox textarea field. I've looked seemingly everywhere for an complete example for writing a metabox with a textarea that uses the ...
3
votes
2answers
921 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) ); ...
3
votes
1answer
466 views

Custom filter for the_content doesn't work correctly

=====THIS POST HAS BEEN UPDATED===== SCROLL TO THE BOTTOM TO READ THE UPDATE! I asked a question yesterday that a gentleman named Tim was nice enough to take a stab at. He helped me through writing a ...
2
votes
2answers
3k views

Properly add an upload media button in a meta box field

i have a custom post which has a meta tag that needs to be using a file upload (for video files). I am wondering, what is the correct way of adding an Upload button that points to the wordpress media ...
2
votes
1answer
233 views

Create meta boxes that don't show in custom fields

I used the code below to create a metabox for posts. These meta boxes are also seen in the custom fields. I do not want these meta boxes to show in custom fields. Is there any way to not show meta ...
2
votes
1answer
1k views

add_meta_box: Datepicker like the one for postdate?

I've built a custom post type called "Events". Each event has a future date and I don't want to use the normal postdate of the post. I want to use add_meta_box to add some inputs for this ...
2
votes
1answer
1k views

Priority of Meta Box for Custom Post Type

I'm having a small issue with the custom post type entry screen. I'd like to bump up my metabox right under the content box, but I'm not sure if that's even possible (as the metaboxes in between are ...
1
vote
1answer
347 views

Use Custom Post Type as Custom Field

I want to create a custom post type for store that having all store names and it is working. Now I want to fetch the all stores in a select box in every new post of WordPress, then selected store name ...
1
vote
5answers
303 views

meta content on required pages

I need to post extra information on programs pages, so i have decided to use wordpress metabox but its showing on all pages. So is there any condition check so it could put meta box on those sub pages ...
1
vote
1answer
3k views

How to add a select menu to this metabox code?

I'm using a metabox script that works great for having absolute control over the design and placement of the metabox fields. There is one problem: I can't remember where I found the script and need to ...
0
votes
1answer
149 views

How to List all Sidebars in a Metabox

I'm trying to add a metabox to every page that is a drop down list of all registered sidebars that is then saved in a custom field. I'm using this metabox class I've gotten as far as this: // get ...
0
votes
1answer
224 views

Move Title and the Content WYSIWYG editor position

Right now, the Title is the first thing at the top of the page, then we have next the WYSIWYG Editor. I would like to add a Custom Meta Box and insert it before the title or WYSIWYG editor. How can ...
0
votes
2answers
115 views

Limit checklist by the current user

Bare with me as I explain this. I'm adding an Assistant Editor feature to my multiple author platform. In the box that appears in post-edit page, the Editors can tick which task that they have done ...
0
votes
1answer
326 views

How to set default metaboxes on user creation?

Just for repetition's sake, I want to do the following: I need to set custom fields and the excerpt metaboxes for WP default Posts post type when a new user is created. I know that by default WP ...
0
votes
1answer
190 views

Change Default Custom Fields Metabox Name

I found that the title of the meta box cannot change via the cctm plugin. It shows "Custom Fields" as default, which is pretty annoying to see. Image So I decided to change it in function.php, here ...
0
votes
1answer
438 views

meta_box or custom_field as a second tinymce post-instance?

probably a rather weird question but I have no idea if this is possible or not!? I created a custom-post-type to handle events. An event always has a future date but once this date is over I want to ...
0
votes
2answers
2k views

How can I include meta box content when searching?

When I search on my site it currently doesn't search the content in my custom meta boxes. How can I include this content when searching? I'm registering my meta boxes as follows: ...
0
votes
1answer
925 views

Multiplile values checkbox or select in custom meta box

I have followed the great answer by Jan Fabry in this question . How to make multicheck for post/page meta box this works great. My question though would be , what if someone WANTS a serialized ...
0
votes
1answer
319 views

How to remove the RichText Meta Box

How can I remove the rich text box editor in WordPress? I have used the remove_meta_box function specifying the boxes ID, but it does not work like it does for other core meta boxes: The code I ...
0
votes
3answers
390 views

Adding admin menus to wordpress

I am trying to add a menu box to Pages > Pages or Pages > Add New, basically whenever they access a page, be it to edit an existing page or add a new one, I would like to add a menu box under ...
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
2answers
567 views

Changing Top Level Items into Radio Buttons in the Categories Meta Box?

I know it is possible to change the WordPress category list to radio buttons in the admin panel for posts, but I would like to make the just the Parents radio buttons and the sub categories or ...
3
votes
2answers
281 views

Block metabox - No expanding, no moving around

I would like to make metaboxes as fixed elements, removing the expand function and the drag-and-drop function. Any ideas?
3
votes
3answers
2k views

Add custom option to Standard Page Attributes Meta Box

I'd like to add a simple checkbox option to the exsisting standard Page Attributes Meta Box. Is there an obvious/intended way to do that using the WordPress API, rather than registering a new ...
2
votes
1answer
84 views

all tincymce's switch when updating page after changing from html to text in custom metabox

I have a custom metabox which uses wp_editor and when i switch to text editor instead of visual the main content tinymce also changes to text view when i update. I was wondering am i doing something ...