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

learn more… | top users | synonyms (2)

1
vote
1answer
262 views

1 column admin screen options - move submitdiv to bottom

I'm using this code. add_filter('meta-box-order_post','one_column_for_all'); function one_column_for_all($result, $option, $user){ $result['normal'] = ...
1
vote
2answers
53 views

Remove default Wordpress styling from metaboxes on edit post pages?

Is there a way to prevent Wordpress from automatically wrapping every metabox in the postbox class? Or at least add my own outer div so I can make custom changes via css? Thanks!
0
votes
2answers
198 views

List of Posts in a Custom Field

I have a question. I have a custom post type called Place. I have a situation that there can be place in place. I want to have a custom field parent_place where I could choose a parent of place. The ...
2
votes
1answer
61 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 ...
0
votes
0answers
125 views

Need help on 3-level taxonomy dropdown

I have a code for 3-level taxonomy dropdown. It is working ok till I publish my post. On edit page It isn't showing corectly terms that I selected. $brand_taxonomy = 'county'; $taxonomy_name = ...
0
votes
1answer
51 views

Saving multiple Metabox contents

I'm putting together a fairly simple Custom Page for a friend on their WordPress site, but I'm having some real difficulties getting the contents of the Metaboxes to save correctly. WordPress doesn't ...
0
votes
2answers
31 views

Custom Metaboxes, multiple post selection

I have the following custom meta-box, which works to list a post type, I simply want to allow multiple values to be selected but cannot get it to work, it appears if I tell the select to store ...
2
votes
2answers
65 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 ...
0
votes
2answers
229 views

Display background color or image with custom meta box?

With custom meta boxes, how would I go about displaying the background image (or color if no image is linked) within the page. Code for the page where I want data to displayed. I want to apply the ...
-1
votes
1answer
30 views

What do the numbers mean at the end of add_action('save_post')…?

I've seen on a few tutorials that there are numbers at the end of the call to save Custom Fields/Meta Boxes on the save_post hook. For example, in the WordPress Codex it gives the following example: ...
1
vote
1answer
62 views

Category pie diagram meta box in post editing page

I am trying to build a plugin for showing a pie diagram based on the number of those categories which have maximum posts. This diagram is a meta box in post editing page. Here is my source of ...
0
votes
2answers
219 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 ...
1
vote
2answers
82 views

How to use get_post_custom function on the blog page?

First, I have a static page for homepage and for blog page too. I created a custom box for pages to setup unique background image for the pages. My idea is working on all page templates, but on blog ...
0
votes
1answer
217 views

Image display from custom field

I am trying to display image from my custom meta box but cant make it: function.php file: add_action( 'admin_init', 'order_box' ); function order_box() { add_meta_box( 'meta-box-id', 'My Custom ...
2
votes
1answer
47 views

How to save multiple metaboxes?

I read a tutorial about metaboxes, most of things are clear but I have a question about multiple metaboxes. My question is about saving, in the tutorial: <?php add_action( 'save_post', ...
0
votes
2answers
36 views

I want my post to republish again after adding a custom field

I wanted a code in Wordpress that could allow me to republish the post every time I add a new custom field. For example, if I already have a post and wanted to add an update to it; I want it to appear ...
1
vote
1answer
2k 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 ...
0
votes
0answers
43 views

Saving comments meta values in admin [closed]

This code is for creating a custom meta value for comment. It must be displayed and edited from comment edit screen in the admin area. The meta values are not being saved to the database and I don't ...
1
vote
1answer
44 views

Create custom field key upon theme activation

Upon theme activation I want to create an 'URL' key for the custom fields. Like in . I know who to run functions when a theme is activated, I don't know how to create this custom field key though. ...
1
vote
0answers
67 views

metabox / select custom post in custom post list to display metavalues only the selected cpt

So i have a "select post field" in a dropdown list to select "artist custom post" on a "gallery custom post" and i want to display the photos (from my gallery custom post) only on the selected ...
0
votes
2answers
76 views

Updating post content and custom fields in edit post screen

I'm trying to find the best approach to customising the edit post screen for a custom post type. I want to add a button which, when clicked will trigger code which looks up an external (not WP) ...
1
vote
2answers
28 views

Make the Status, Visibility, or Date fields opened by default in the Publish box

By default, the Status, Visibility, and Date fields in the Publish metabox are closed, and you have to click Edit to show them. Is there a way to make these fields visible by default? The hidden ...
0
votes
4answers
629 views

Add Meta Box not showing on New Post - Custom meta box not showing

This issue has plagued me over a couple projects. I used the default Wordpress class-based template provided in the Codex to start, and built outward. The only issue I face is that my custom meta ...
2
votes
1answer
50 views

Save list from a custom meta box?

I have a simple list (ul>li) which is manipulated with jQuery UI in a custom meta box. How would I go about saving the contents of the list during post save? I already have the save function ...
0
votes
1answer
74 views

How to hide a plugin metabox for non admins when a user adds a new post

I've been able to disable all the meta boxes for non admin in their backend but I'm having problems with Facebook AWD All in one which creates a widget seen by all the users when they create new ...
4
votes
1answer
1k views

What is the “Advanced” $context in add_meta_box?

In the codex it lists the parameter $context for the add_meta_box as having the following options: normal advanced side What does "advanced" do? I don't see any difference between it and ...
0
votes
0answers
30 views

Only allow Custom Taxnomy Metabox to show current tags [closed]

I have a few hierarchical custom taxonomies, and terms have been added and removed from them over time. How can I make sure that the metabox on the postpage only displays current tags and not old ...
0
votes
0answers
79 views

Show metabox date field in standard format, with UNIX timestamp in database [closed]

I've setup an Event custom post type with a metabox to capture the event date. I'm converting the date to a UNIX timestamp using strtotime, and I've setup the function to convert the timestamp to a ...
0
votes
3answers
235 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 ...
1
vote
2answers
102 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: ...
1
vote
1answer
38 views

How do wordpress hooks respond to user interaction?

Embarrassingly big hole in my understanding! When I've finished editing a post and click the big blue "Update" button, what happens next? In particular, how does the 'pre-post-update' hook (which, ...
0
votes
0answers
32 views

Check Types custom checkbox and metadata when publish post

I´m using Types to create metaboxes with custom checkboxes to make some custom functions. The problem I have is with this function I created: function check_zone_tag(){ $postid = get_the_ID(); ...
0
votes
2answers
185 views

How to customize the Categories meta box to allow only one category?

I'm trying to customize the Categories meta-box when adding a post. I have added a custom post and I need the administrator to post a new post without the ability to use the top level categories ...
1
vote
1answer
315 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. ...
2
votes
1answer
221 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 ...
0
votes
3answers
1k views

Adding URL of PDF from Thickbox in a Meta Box

I have created some meta boxes of pages on the theme i'm working on. The idea is to have a input field, then a button to upload files. The meta box is working properly. When I click on the button, ...
0
votes
1answer
57 views

Separate tags with semicolon

Does anyone know if there is a way to change the callback function for a tag-like custom taxonomy so that it breaks terms after a semicolon instead of a comma? I realize I can rewrite the whole meta ...
1
vote
1answer
407 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 ...
7
votes
6answers
2k views

Disable dragging of meta boxes?

Anyone know how to disable this functionality so the meta boxes can't be repositioned?
0
votes
1answer
44 views

Add a class to post_class if more than one post shares same meta_value_num

I would like to be able to add a class such as .samedate to posts that share the same meta_value_num from a custom meta box. So for example: Say two posts share the same custom meta box value for a ...
1
vote
3answers
375 views

Change the post date from a meta box

I'm having a problem with updating the post_date in a custom function I've written. I'm trying to change the "post_date" to my custom "meta_date" value. Here is the function: function ...
1
vote
2answers
239 views

How can i add some static text above the editor?

I created a custom post type and i want to display some text on the editor page below the title and above the text editor. How can i do this? I tried using add_meta_box, but i wasn't able to move it ...
0
votes
1answer
53 views

Tags meta box don't show when creating a new post type

After creating new custom post type with register_post_type() function, I don't see the Tags meta box when adding a page of new post type. It seems that tags metabox should be added manually. If so, ...
1
vote
1answer
82 views

Custom Metabox Not Saving

I've simplified a problem of saving custom metaboxes on update and still can't get the box to save the custom-field input to the database. This is the call from functions.php to an external file ...
1
vote
1answer
277 views

Show add_meta_box by selecting a specific category

In my plugin I want to display an add_meta_box under the WYSISWYG in the new post page, which is no problem and works fine. But the box should only appear when a specific category (example: category ...
3
votes
3answers
229 views

How to put Periods and Spaces for Array Values (Meta Key)

Problem: Before I created meta-boxes I did things the old fashion way by entering custom fields directly. I went through the process of filling in the ID and the Value by hand and hitting the ...
0
votes
1answer
66 views

Loading one meta box only on post-new.php with a forward link

I need to load a meta box for editors to choose the parent post first before editing. But dont see the wide meta box i expect and the normal edit page just loads: This is the code at the begining of ...
1
vote
1answer
2k views

How to construct multiple meta boxes

As of now I have a perfectly working script for a single meta-box. (I'll supply the details below.) However, I want to add more meta-boxes but am having trouble wrapping my head around how I would ...
-3
votes
1answer
63 views

do_shortcode does not work with slideshow shortcode

I am using the Slideshow plugin 2.2.7 by Stefan Boonstra and am adding the shortcode to a custom wp_editor() metabox. When I echo the slideshow plugin with: echo do_shortcode( $banner ); /* $banner ...
2
votes
1answer
678 views

wp_handle_upload error “Specified file failed upload test” but still creates attachment?

Having a bit of trouble with an image upload custom meta box. What happens is the uploaded image is created as an attachment but the wp_handle_upload seems to kick back the error "Specified file ...

1 2 3 4 5 13