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

learn more… | top users | synonyms (2)

0
votes
1answer
1k 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
345 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
395 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 ...
6
votes
2answers
148 views

How to make open/closed and hidden/shown metaboxes status saved on a per-post basis?

My real problem is a bit complex, so I'll try here to abstract it and keep it simple. I'm working on a custom app based on WordPress. I registered a custom post type, let's call it "people" where I ...
4
votes
2answers
9k 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
647 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
121 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
446 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
3k 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 ...
3
votes
2answers
8k 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
92 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
308 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
2k 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
942 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
92 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
1k 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
125 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
888 views

Wordpress metabox file upload in custom post [duplicate]

I'm relatively new to wordpres development and am stuck at this issue. I have created a custom post type which shows up in the admin menu. I need a metabox in it with a file upload field. The metabox ...
1
vote
1answer
278 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
2answers
107 views

Access the environment of an admin page from another admin page

I've been busy thinking about a problem, and so far I didn't find a solution to it. The abstract scenario On admin page A, I would like to print the value of a (global) variable—in the context ...
1
vote
1answer
793 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
2answers
569 views

Saving metabox repeatable fields

This is a code that I'm adapting from https://gist.github.com/2057532. The problem is that I'm not being able to save the content from the new fields that I created. I had checked the other questions ...
1
vote
1answer
162 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
865 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
219 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
826 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
376 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
16 views

I'm able to export a post type with all items + metadata, but not seeing it when importing

I'm trying to export some of the post types that I have on my wordpress website. These post types have metaboxes with data. I am able to export the post types with that data succesfully. The problem ...
0
votes
1answer
175 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
1answer
95 views

Custom post type's slug gets wrong when adding a custom meta box

I'm trying for hours now to find the error moving back and forth. I have a custom post type. Everything works fine until I add my custom meta box. Now suddenly the slug gets the title of one of ...
0
votes
0answers
77 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
234 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
67 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
53 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
206 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
679 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
1k 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 ...
0
votes
1answer
580 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
560 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
609 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
189 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
781 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
424 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
1k 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
368 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 ...