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

learn more… | top users | synonyms (2)

4
votes
2answers
603 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
1answer
98 views

Removing meta boxes: remove-meta_box() or unset()?

I've seen two ways to remove meta boxes: remove_meta_box() and unset(). function TEST_remove_dashboard_widgets(){ remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); } ...
3
votes
2answers
351 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
88 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 ...
2
votes
1answer
276 views

Add script to footer - on post editor

How do you add a script on the footer of the post editor ? I'm adding a meta box under the post editor and I need to include a javascript before the closing body tag (on the footer) How do I achieve ...
2
votes
2answers
2k views

Why is `add_meta_box` not working?

I'm trying to add some meta fields to a WPSC product using the following code: /** * data callback */ function abc_callback($object, $box) { echo 'callback executed!'; } /** * add custom ...
2
votes
3answers
1k views

Metabox nonce PHP notice

I've been getting a notice when I try to add a new post in two different taxonomies, in one i use a custom meta box and in the other not, however the notice appears for both when trying to add a new ...
2
votes
1answer
841 views

Conditional Meta Boxes

I am creating multiple meta boxes in WordPress, and I want the user to be able to toggle certain boxes on or off. So, they click a radio button (in a separate meta box), update the options, and an ...
2
votes
2answers
6k views

Upload multiple images in a custom metabox

I am new to theme development. I am trying to create a custom metabox that has the ability to upload a image. I am doing this on a page not a post. I want to output the images (multiple) onto the page ...
2
votes
1answer
83 views

How to attach Links into page/post or custom post type?

I need to create or use an existing 3rd party plugin to attach any links (one or more) to a page, post or post-type from the WP link manager: http://example.com/wp-admin/link-manager.php I need a ...
2
votes
2answers
990 views

Cleanest way to code “Custom Write Panels/Meta Boxes”?

As with anything in Wordpress it seems there are 20 way to do something, but after several weeks of extensive searching I really haven't found more then a couple tutorials floating around that really ...
1
vote
1answer
25 views

How to access global $wp_meta_boxes variable on front-end?

Is there a way to take the global $wp_meta_boxes variable to be used in the front-end? Currently the $wp_meta_boxes is accessible on specific admin pages only. I've found a similar question about ...
1
vote
1answer
128 views

get_post_meta doesn't work

I created a custom meta box inside a page but I can't display the content! I'm inside the loop and here there is the code of my functions.php: $meta_box['portfolio'] = array( 'id' => ...
1
vote
1answer
608 views

Arrange custom fields with drag and drop?

I am making theme for hotel and i made custom metabox with list of various custom fields that i would need in posts. What i did is i made a list of fields like booking wifienabled coffe pool spa ...
1
vote
1answer
964 views

Add Standard Page Attributes Metabox for Page Parent

I have a custom post type 'product' supplied to me by a Wordpress eCommerce plugin that does not offer the option to change the Page Parent in the Page Attributes Metabox. I'd like to remedy that. I ...
1
vote
1answer
150 views

Embed 'New Post' Form Inside 'New Post' Form

Is it possible to embed a 'New Post' form for one Custom Post Type inside of a 'New Post' form for another Custom Post Type? When a user adds a new post for the custom type 'Event', they should also ...
1
vote
2answers
826 views

How to Create an Image Upload Box for Custom Posts?

Is it possible to have an image upload box in a Custom Post Type? I would like the user to be able to upload specific images just for the CPT.
1
vote
1answer
210 views

Post Meta not saving when have empty post

Hi I created a meta box on the post, page and project post types. The meta boxes save their data well on every post type. However I have a slight problem, when I create a new post and just enter a ...
1
vote
1answer
815 views

TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2

I want something very simple: a custom metabox with a TinyMCE editor in it. The following code help me achieve that easily in 3.1.4: add_action( 'add_meta_boxes', 'add_metaname_box'); function ...
1
vote
3answers
4k views

Get the term id belonging to custom taxonomy on a custom single-post-type.php template page

I have custom post-type 'sermon' with custom taxonomy 'speaker' attached to it. I wanted to assign custom meta values to the speaker taxonomy, so I am using the taxonomy meta class from Rilwis: ...
1
vote
3answers
2k views

Conflicting save_post functions when passing the post id and saving custom meta boxes for different post types

Post save functions are conflicting with each other when adding them to the save_post action hook. 2 different custom post types with 2 different (one for each post type) custom meta boxes. I'm ...
1
vote
1answer
373 views

Change meta box when the page's template is changed

For my WordPress theme I have a custom portfolio post type and a portfolio page template to display them. What I want to do is add a meta box to the edit page area, but only when the page has the ...
0
votes
1answer
20 views

Second select list values are not saved after clicking update

I have a select list in a metabox which value is saved successfully after clicking "Update" when editing post. Of course, the values are custom taxonomies. But i don't know how to add another select ...
0
votes
0answers
44 views

How to validate datepickers before publish

I have two datepickers in my post: 1. start_date and 2.end_date Basically, I need to check if end_date is greater than start_date before I can proceed to publish. From a previous solution here, I ...
0
votes
1answer
170 views

Why does not my metabox save?

I know there are many questions about variants of this, but I have not been able to find an answer. I have a metabox on the post type page, containing nothing but a checkbox. It seems like it won't ...
0
votes
2answers
1k views

Check if meta key value already exists

Let's say that I have few posts with meta key "videoid". Value of that meta key is different for every post (and has to be different). When adding new post, how can I check if videoid with that exact ...
0
votes
1answer
37 views

Script dependencies for post.js

I have already got the built in meta boxes displaying on the front, but some of them require the accompanying wp-admin/js/post.js to function correctly. I'd rather not rewrite anything here and just ...
0
votes
1answer
51 views

Problem for recover and save metaboxes

I create metaboxes but i can´t save data and also no show data insert into field , this is my code <?php function reaction_buttons_meta2() { global $post; echo ...
0
votes
1answer
192 views

Dynamic number of fields in a meta box

I am working with a recipes blog and I use custom meta boxes. $food_box = array( 'id' => 'foodbox', 'title' => __('Ingredients details','splus'), 'page' => 'recipes', ...
0
votes
2answers
515 views

How to load php file for specific page in admin?

Hello and thanks for the guidance! Trying to load a custom .php file for only my home page (template is page-home.php) by using this code: add_action('admin_init','load_home_meta'); function ...
0
votes
1answer
472 views

How to stop wordpress from mangling HTML in a metabox textarea

Can anyone lend a hand and suggest the best way to get a textarea in a meta box to stop mangling HTML? I've been digging around here online... and here...and also here...looking for answers, but I ...
0
votes
2answers
470 views

Meta Box Plugin Cloned Fields - Multiple Foreach values

I have the following code that I can't get working. I have two cloneable fields that are being output as one entity (URL and thumbnail image). These are cloned fields using the Meta Box Plugin by ...
0
votes
1answer
471 views

Displaying Saved Meta Box Data in Drop Down with selected()

I have a custom meta-box for certain custom post types, and one of those fields in the meta-box is a drop down. I am providing the field correctly, saving the information, and even calling it ...
0
votes
1answer
164 views

How do I assign this filter to a variable? (Appending php & markup to the_content)

===I HAVE SOMETHING THAT WORKS NOW, JUST NOT CORRECTLY. PLEASE READ THE WHOLE POST, I AM GOING TO LEAVE IT ALL UP HERE BECAUSE OTHERS MAY BE ABLE TO BENEFIT FROM ME BUMBLING THROUGH THIS PROCESS!! I ...
0
votes
2answers
711 views

Order custom posts by a date metabox

I have a custom metabox, where I store the date in plain text like this: dd/mm/yyand now I need to order the posts by that date.The custom field is called event_informations_date <?php $args = ...
0
votes
1answer
412 views

Having trouble with custom post type / meta box

I've been working on a custom post type meta-box implementation that allows me to change the post_date to match the value in my "date" meta-box. The function works perfectly except when I try to add ...
0
votes
1answer
842 views

prevent post submission

I'm using a meta-box for custom post type. I have three problems: WP seems to run the function that I attached to the "save_post" action, every time a new post is opened for editing or reloaded. Is ...
0
votes
1answer
1k views

Using 'strtotime' function to convert a custom-meta-box to a date-stamp

I am building a "podcast" post type in a wordpress build using custom-post-types, meta-boxes & taxonomies. There may be a simpler way to do this.. I'm still learning and this is my first go at ...
0
votes
3answers
1k views

Custom field being erased after autosave

Why wont the custom fields from this post type save? I have a custom post-type called Photos and a couple of meta boxes. Here is basically what I have in my functions.php add_action('init', ...
0
votes
1answer
336 views

Custom Meta Box with variable number of fields

Here is what I wanna do and I basically would just like some ideas from someone more experienced that would help to get started in the right direction. I have a custom post type (Exams) that has is ...
0
votes
1answer
678 views

Create a page Meta Box listing all blog users

I have a custom post type where each post can only be seen on the frontend by one specific user. I have figured out how to make an archive template where only posts with the meta _allowed_user = ...
0
votes
1answer
179 views

Why is save_post triggered even when I havent saved the post

I created a meta box I notice that save_post seems to be triggered when I land on the page, thus giving me errors like Undefined index: xxx in /data/www/ae/wp-content/themes/xx/functions.php on line ...
0
votes
2answers
854 views

How to add meta boxes to the 'Add new post' screen?

I want the user to fill in a form (when they create a new blog post). The results of the form should be embedded within the new blog post. So I am trying to think of the best way of coding this. Meta ...
0
votes
2answers
596 views

Replace the Post Excerpt Meta Box with a Field in My Custom Meta Box

I've got a custom meta box for a custom post type which will be the only metabox I plan to show in the main column (except the native title box). I want to move the native Expert box/field inside my ...
-1
votes
1answer
77 views

Create A Metabox For A Custom Field

I add videos to my WordPress posts' video format by using custom fields. I was wondering if there is any way to create a meta box in post editor (like excerpt or something) for that specific custom ...
-2
votes
1answer
93 views

metabox displaying on incorrect page

I've got two different functions that output different metabox's one is for the pages and the other is for just the post. For some reason the one I created for posts overwrites the one on pages and ...