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

learn more… | top users | synonyms (2)

22
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 ...
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 ...
7
votes
4answers
8k 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 ...
4
votes
1answer
490 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 = ...
12
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() { ...
9
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 ...
0
votes
1answer
2k views

Custom meta box shown when template is chosen [duplicate]

Possible Duplicate: Toggle admin metabox based upon chosen page template Is this possible to change editor screen immediately after someone picks some template from the drop down? I need a ...
5
votes
1answer
419 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 ...
2
votes
2answers
868 views

How to add or remove metabox each page separately?

How to add a meta box for a particular page, say: for only About Us page. How shall i do? The current code adds the metaboxes for all pages: function myplugin_add_custom_box() { add_meta_box( ...
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 ...
12
votes
6answers
9k 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 ...
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 ...
9
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 ...
1
vote
2answers
355 views

How to make a meta box field a requirement

I'm building a plugin that has a meta box. Some of the fields in the meta box are required. Is using Jquery the only method for achieving this? Can I require that a field is filled in using php? ...
1
vote
2answers
269 views

How to activate “Description” metabox for menu item programmatically?

I'm creating custom wordpress theme. How can I enable "Description" metabox for menu items (on nav-menu page) by default programmatically?
0
votes
2answers
197 views

Modifying the main editor priority

I want the main WordPress post editor to appear below some of my meta boxes (generated by Advanced Custom Fields). I know there are the add_meta_box() and remove_meta_box() functions, however it'd be ...
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
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 ...
5
votes
2answers
2k 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 ...
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 ...
2
votes
1answer
764 views

How to add automatically keyword to taxonomies when a post published, and assign them to the post

How to add automatically keyword to taxonomies when a post published, and assign them to the post for example i have in my post edition, a custom meta box, when you complete this input, a function ...
2
votes
2answers
4k 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 ...
3
votes
1answer
2k views

WP_Query with checkbox meta_query

I have posted this on StackOverflow too, not sure if that's allowed - if not let me know and I'll remove one (I don't want to look like I'm spamming). Anyway.... I have a custom post type and have ...
3
votes
4answers
4k views

custom fields for attachments?

is it possible to add extra fields via the functions.php script for attachments in wordpress? Tried loads of examples but none seem to work. Worried an existing plugin might be affecting my attempts ...
3
votes
1answer
954 views

How do you remove a Category-style (hierarchical) taxonomy metabox?

I was wondering if someone can help me with this. I'm currently following Shibashake's tutorial about creating custom meta-boxes that include taxonomy selection here: ...
1
vote
2answers
1k views

Adding submit or update button to custom metabox?

I have alot of custom meta boxes, and the user has to scroll to the top everytime he wants to save the meta info. Is there a way to put submit buttons at every meta box that does that same as the ...
0
votes
1answer
652 views

Dynamic page.php template for custom post types

I have a couple of custom post types registered. I would like to display all "posts" from each custom post type on its own page, and these pages must be visible in the nav menu. It would be great to ...
0
votes
1answer
336 views

Metabox repeating fields - 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() { ...
1
vote
1answer
2k views

Custom Meta Boxes: Store two values in one repeatable field

I am trying to create a custom meta box where the user can add fields as needed. I followed this tutorial: http://wp.tutsplus.com/tutorials/reusable-custom-meta-boxes-part-1-intro-and-basic-fields/ I ...
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?
8
votes
6answers
3k views

Disable dragging of meta boxes?

Anyone know how to disable this functionality so the meta boxes can't be repositioned?
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 ...
3
votes
1answer
743 views

How to group meta boxes on the post edit page

I suspect that this is not possible right now, but oh well.. I'll ask, maybe one of you has some intersting thoughts to share. So let's say we have the following taxonomy terms meta-boxes on our post ...
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 ...
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:
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 ...
3
votes
2answers
2k views

Remove the Yoast SEO Post Metabox

Yoasts SEO plugin adds a metabox to the post edit screen. I'm trying to remove this for users who aren't editors or above. I've tried putting a remove_meta_box call in on admin_init, trying to remove ...
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 ...
6
votes
1answer
609 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, ...
4
votes
4answers
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 ...
3
votes
1answer
170 views

Adding an assisting editor box to Post page

I run a multiple author platform and to improve the moderation, I want to add a couple of assisting editors. I want to add a custom box to the Post page where the assisting editor can confirm which ...
3
votes
2answers
871 views

Remove tabs from media uploader for a CPT

I use the media uploader in a own meta-box for a custom post type called "premium". The Thickbox opens after a click of the button in the meta-box and files can be uploaded. Now I want to remove the ...
4
votes
2answers
1k views

Using media-upload.php to upload mp3 via custom fields

I'm trying to use the Thickbox file upload dialogue with a custom field to allow the user to upload an mp3. What I want to do is to grab the URL of the uploaded mp3 and save it as postmeta (saving the ...
2
votes
2answers
3k views

Populating meta box with select-list of existing posts, and assigning it to custom post types

My question is partly based on this answer: http://wordpress.stackexchange.com/a/5778/27135 Mike's answer is really great, and the solution worked fine until I needed to include my meta box in a ...
1
vote
2answers
733 views

How to Move the Author Metabox into the “Publish” metabox?

About a year ago I remember seeing a plugin or some code which allowed you to add an author dropdown menu to the post "publishing" metabox instead of it being on its own. I can't seem to find this ...
12
votes
6answers
8k 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 ...
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 ...
2
votes
2answers
2k views

How to make multicheck for post/page meta box

Please help me understand how to make Multicheck type for metabox. Search for all internet and nothing. Thanks. UPDATE @Jan I have a headache from this function. I dont know whats wrong.I'm ...
1
vote
1answer
1k views

How to sort CPT by custom meta value (date), and return posts month by month

For future reference: I am using the great Meta Box Plugin to help expedite meta box creation for my custom post types. My goal: To build a highly customizable events section closely resembling a ...
1
vote
2answers
2k views

Removing Edit Permalink/View “Custom Post Type” areas

Trying to replicate some functionality I've seen on a few other themes before, but would like to know/understand for my own uses. I've created a custom post type, called "testimonials". I believe ...