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

learn more… | top users | synonyms (2)

2
votes
1answer
84 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' ); } ...
2
votes
2answers
471 views

Auto close (hide) custom metabox / set default state

I am using the WordPress function add_meta_box() to add my own custom metabox. So how can I auto close/hide on page open ? Currently, I just add a CSS class closed to metabox's <div> element ...
2
votes
1answer
246 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
732 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
1answer
79 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
942 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
460 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
852 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
140 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
5k 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 ...
1
vote
2answers
708 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
197 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
200 views

Unbind postbox click handler

I'm trying to unbind the click handler on post metaboxes so they no longer hide when the handle is clicked. I need to do this because I use the handle to contain <select> elements & when ...
1
vote
1answer
812 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
3k 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
367 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
0answers
29 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
107 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
1answer
27 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
89 views

Saving div elements generated with jQuery [duplicate]

I have certain blocks of code like BlockA(a,b,c) and BlockB(b,d,e) and so on where these a,b,c, etc.. are all input fields. All these blocks are hidden initially with css and post editor has the ...
0
votes
1answer
50 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
177 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
3answers
459 views

Possible to add meta box to edit.php pages?

I've been googling this for a while, and came across this link here: Can I limit this meta box to a particular page? What I am trying to achieve is adding a custom Meta Boxe I created onto a CPT ...
0
votes
2answers
415 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
398 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
401 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
386 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
154 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
681 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
400 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
759 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
308 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
609 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
172 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
833 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
556 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
46 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
89 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 ...