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

learn more… | top users | synonyms (2)

0
votes
1answer
21 views

Delete custom post type metadata without deleting the post in admin area

I'm working on a plugin for a client and they need the ability to attach a couple of PDFs to a post as metadata. The client will need to occasionally update these attachments but without deleting the ...
1
vote
1answer
25 views

Troubles with saving metabox

So I used to have a few metaboxes, which were labelled poorly (meta_1, meta_2) and I went about renaming them to make it easier to understand for maintenance. When I went back to see how other users ...
0
votes
1answer
18 views

Meta Box - Javascript Datatable

Hello my fellow WP Developers, I am running into a wall with a custom theme I am creating for a personal project. Background It's a website that will be used by users that collect a specific ...
0
votes
0answers
13 views

How to add all the number given in field of metabox of wordpress?

I have added a field called number of question in post meta box. THe feild name is no_of_question. To get the number of question i can do echo get_post_meta($post->ID, $field['no_of_question'], ...
1
vote
1answer
46 views

custom-meta-box checkboxes from loop won't save

I tried to create a custom meta box with checkboxes, generated from a loop of a custom-post-type. I found this example here on WP Development, but I can not figure out why the boxes won't save. My ...
0
votes
1answer
32 views

Get content of publish box

is there any way how to safely get content of the publish box? For example via some hook or filter? I wasn't able to find anything. I need to place in in some different place.
1
vote
1answer
51 views

How to remove “publish metabox” from each post type

Is there any way, how to remove "Publish metabox" from each post type (post,page,custom_post_type) anything. I know how to remove it manually, for each post type, but how to do it globally? ...
0
votes
0answers
48 views

Get meta fields by meta box id

I created a meta box using this function: add_meta_box( $id, $title, $callback, $screen, $context, $priority, $callback_args ); How can I list all created meta boxes with their meta fields?
0
votes
0answers
69 views

Admin - Dequeue unnecessary scripts/styles

Currently, I'm working on a plugin where I use custom post type. In each post type edit page I've got meta data fields to set advanced functionalities. However, because the interface needs to take ...
1
vote
1answer
122 views

get_post_type() in in_array doesn't work for some reason

I am trying to create some function for metaboxes and some reason i can't get get_post_type to work in in_array. Everything else seems to work in testing but in_array nope. This is the function that ...
0
votes
2answers
25 views

Create metaboxes based on custom post type

I am using Metabox to create metaboxes for Worpdress Post and it works like a charm. Now I have installed MetaBox Custom Post Type Extension for create CPT and it works good to. I have Types plugin ...
0
votes
0answers
24 views

Create meta boxes globally

I am trying to create a smallish plugin for my needs where I can be able to add some information about people only visible to back-end - I don't want to have it like a post visible to public, and ...
0
votes
2answers
26 views

Access meta box checked value in another file

So basically I need to access the value of checked() in order to load diferent template parts in my single.php file. This is my meta box: <?php function ...
0
votes
1answer
148 views

Load different single.php templates according to post layout selection

I have created a way of choosing different layouts for posts(sidebar right, sidebar left, full width). This is done through a meta box that displays radio buttons with an image for each layout type. ...
0
votes
0answers
168 views

How to make multiple upload meta boxes in custom post type

First question here. Been spectating for a while. Great community. I've been writing a simple plugin to add an upload metabox to my custom post type 'video'. I can make the first upload field work. ...
0
votes
0answers
20 views

Conditional metabox jquery

I have a metabox where I am trying to hide a div inside of it whenever a option is selected, I also have another area but with radio buttons (separate div). Issue The issue I am running into is the ...
1
vote
1answer
34 views

Is it possible to sort metabox teaxtarea values?

Textarea is on an options page, is it possible to sort the values within that textarea by alpha? I looked in the Codex but do not see any mention of sorting these values.
0
votes
1answer
35 views

Create a select metabox that the user can pupolate?

I have been working on a plugin that uses text area metaboxes on an options page to populate drop downs in the CPT area. I was with the help of some others able to get the list to show in the select ...
0
votes
1answer
36 views

Display custom meta on page that has been check in custom post type

I have created a custom post type (cpt) and within each post type is a custom meta field. This custom meta field displays all the pages that can 'checked'. Code to generate the custom meta box: /...
0
votes
0answers
33 views

Add Postbox for Featured Image Caption in wp-admin/post-new.php

I'm newbie here. I want to add postbox / meta box in my wp-admin/post-new.php page. Someone please help me. Last days i have try to search it in any tutorial, but i cannt solve it. I try to modify ...
0
votes
3answers
55 views

Where WordPress Stores The Custom Fields Values

I have a custom Post type called product which has a Methabox with a Custom Field Called Price I entered $ for some of the products and I need to remove them from the WP table. Now can you please let ...
0
votes
1answer
83 views

How do I make this Metabox show current DB value?

<p> <?php $options = get_option( 'city' ); $names = explode( PHP_EOL, $options ); ?> <label for="City" class="timeshare-row-title"><?php _e( '...
0
votes
0answers
32 views

metabox inside custom post

i'm trying this to add metaboxes inside custom post but never show the metabox Function Reference/add meta box « WordPress Codex Example: But never show this inside custom type post, Only inside ...
0
votes
0answers
19 views

Are labels required for making a metabox

I'm a noob so I apologize if this is a dumb question. I read through all of the metabox documentation plus blogs but didn't see an answer. Is it mandatory to include a label for a metabox? For ...
0
votes
0answers
42 views

Metabox is not saving

Any idea, how I would get this to save? I have several select boxes that are done with the standard option statement. This one has me stumped on how to get it to save. <p> <?php $options ...
0
votes
0answers
37 views

select metabox not saving selection

The code below reside in my plugin.php file, the select box populates fine from the options text area but does not save the chosen value. do not understand why. <p> <?php $...
1
vote
0answers
142 views

How to make custom taxonomy into drop down select in a custom metabox

I have a custom post type that I am creating custom meta boxes for on the "Add New Post" screen. I would like to remove the default meta boxes for a given custom taxonomy and place it in a drop down ...
0
votes
0answers
14 views

All Metaboxes on position 'side'

I added a few custom metaboxes to my custom post type. I did add one of them with position 'side', but to others I said 'normal'. Now all the metaboxes are showing up on side, even the ones which ...
0
votes
0answers
21 views

Metabox values are empty on POST

I've created a metabox for my custom posttype for a shopping plugin. But right now I have some troubles saving the data. This is my metabox view: function wpt_products_price() { global $post; ...
1
vote
3answers
352 views

Why does get_post_meta not work with the posts page?

Looking for a reason why get_post_meta() doesn't work with home.php. From my reading I understand that it's a template and not a post or page, per "Custom fields won't display on my blog page". The ...
0
votes
0answers
28 views

Plugin dev: How to multiply instances of a plugin in the same metabox?

I have a picture uploader that fits inside a metabox in the administration. I would like to have four instances of this uploader in the same metabox in order for the administrator to manage 4 ...
0
votes
0answers
47 views

Create new sidebars trough admin post/page metabox

I have this bit to register sidebars dynamically: function my_custom_sidebars() { $sidebars = get_option('my_theme_sidebars'); // get all the sidebars names if ( ! empty($sidebars) ) { // add a ...
0
votes
1answer
378 views

Display meta box on front end

I'm trying to add a meta box into a custom post type and display the text on the front end. I made a meta box as follows: array( 'name' => __( '<b>Schema</b>', 'themeum-soccer'),...
0
votes
0answers
92 views

MetaBox autocomplete field with another custom post type?

I am using the MetaBox.io plugin and creating a post type called "Book" which I am trying to relate to another custom post type called "author". How can I create a custom field for Books that would ...
0
votes
0answers
36 views

Query and compare multiple meta values

The problem: I have a custom post type of 'events' which has two metaboxes: cf_eventdate and cf_eventend. The first contains the event date, in the format: 2015-11-05. The second contains the end ...
1
vote
0answers
98 views

wp_editor in metabox not working

So, I've created a meta box within my page to allow my client to be able to add content into multiple different content blocks dynamically. I've done that using the wp_editor function like so. ...
0
votes
1answer
136 views

How can I output WPAlchemy repeating fields meta values in my page template?

I have a custom post type, Downloads, which contains some custom metaboxes, including a repeating field. I'm able to output the values for all of them in my page template, but I'm not able to output ...
0
votes
0answers
72 views

Custom drop down meta box not saving

I'm really struggling with my drop-down meta box. I created a custom post type, and am in the midst of creating shortcodes for recent posts, all posts and now featured posts. I created a custo ...
0
votes
2answers
86 views

Only allow one meta key value per post in a category

I have created a meta box for a theme I am working on, it is a simple meta box with a check box for featured post. The problem is user can tick that check box for multiple posts in the same category. ...
1
vote
0answers
28 views

Adding Page Templates to post but it ignored it

I follow the post to add the template metabox to a custom post type's editor, but it doesn't work. When I visit the post, it shows "NOT FOUND ANY POST" which looks like index.php or single.php ...
0
votes
0answers
21 views

create custom field dropdown

so far I'm using custom field on my theme to display dynamic content, for example: <?php echo get_post_meta( get_the_ID(), 'product', true ); ?> <?php echo get_post_meta( get_the_ID(), '...
0
votes
0answers
26 views

Meta Box not being added in plugin

I am attempting to create a simple oop plugin that registers a few custom post types and then adds meta boxes to that custom post type. It is currently adding the post type but it's not adding the ...
0
votes
0answers
24 views

Media uploader metebox

I have this code for adding your own metabox. It is to add custom metabox media uploader. I can not show in the template gallery. How to view the gallery in single.php? Thanks. define('...
0
votes
1answer
18 views

Alter add_meta_box

I am trying to create a custom post type (through a plugin). The post type must be pretty similar to a page, so I would like to load meta boxes from other plugins and theme in my custom post type. I ...
0
votes
0answers
84 views

How to export data from a custom Meta Box added into categories

I have a custom meta box (text input) in the categories to insert the 'Meta Description', and when I export the data by using Tools > Export, this meta box is not exported. Actually, the content of ...
0
votes
0answers
62 views

How to call metabox value in custom post type query shortcode?

I am trying to make a testimonial shortcode. That is why I registered a custom post type and now trying to call it using shortcode. I also create a custom metabox for testimonial client country input. ...
1
vote
0answers
43 views

Is there a way to display metabox in frontend? How?

I was wondering if there is a way how to show the metabox in frontend. What i want to achieve: I want to be able to use the metabox to edit posts from frontend the same way i do it from backend. ...
0
votes
1answer
48 views

Metabox Keeps Stripping Parts of Shortcode

I am creating a custom metabox, and it will be filled with shortcode. The problem is, after I saved it, it keeps stripping / deleting the last part of the shortcode, like this: Suppose to be: [...
2
votes
1answer
195 views

Adding Metaboxes - so much code is there a shorter DRY way?

I added the following two metaboxes to my functions.php file and it works, but it's a lot of code. Question: Is there a shorter or simple way to do this without a plugin? /** * Add custom fields ...
0
votes
0answers
21 views

Change the priority of multiple custom taxonomy metaboxes

This question has been answered here... Changing the priority of a custom taxonomy's metabox But I need more clarification... How does this work for multiple custom metaboxes? Let's say the ...