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

learn more… | top users | synonyms (2)

2
votes
2answers
25 views

Metabox Not Showing on Custom Post Type But On Pages and Post

I have a Custom Post Type like function cpt_Projects() { $labels = array( 'name' => 'Projects', 'singular_name' => 'Project', 'menu_name' ...
0
votes
0answers
19 views

Color picker for posts and pages

I want to add color picker to wordpress posts and pages at admin menu. I have this code for color picker: add_action( 'admin_enqueue_scripts', 'add_color_picker' ); function add_color_picker( $hook ...
0
votes
2answers
496 views

Select box saves but doesn't update value in admin

I have a select dropdown in my custom meta box in the admin area. It offers two options Approved and In Progress. When I select an option and save it the database is updated, but the value in the ...
2
votes
2answers
101 views

esc before saving or before displaying does it matter?

In a lot of how to create a custom meta box tutorials, when saving data, i.e., update_post_meta the data is escaped: update_post_meta( $post_id, 'city', esc_attr( ucwords( $_POST['city'] ) ) ); ...
2
votes
1answer
990 views

wp_dropdown_categories in custom post type with custom taxonomy

I have a custom post type with its own taxonomy, basically 'show venues' is the post type and venue-regions is the taxonomy. Seeing how a venue cant exsist in mutiple regions, I've removed the ...
1
vote
1answer
22 views

Populate dropdown from one custom post type inside another custom post type

[Solved -> see last comment in this question] In custom post type CPT_A I am saving first_name and last_name via a custom metabox form field (they are not taxonomies): update_post_meta( $post_id, ...
0
votes
1answer
12 views

meta boxes not showing on clean install [closed]

I made a plugin that works fine on my wordpress install, but when I install it in a clean wp my meta boxes dont show up in the new post screen. They are on the same server so it isnt a dependency ...
0
votes
1answer
47 views

Meta box not saving

I am following Noel Tock's tutorial on making an Events CPT and so far I was able to show the custom columns and the custom meta box. The problem now is that I cannot save the data inside the meta ...
1
vote
0answers
15 views

Render Selected Categories in Admin Edit Post Screen differently

Selected Categories for a post in the admin screen are rendered by: // Put checked cats on top $output .= call_user_func_array( array( $walker, 'walk' ), array( $checked_categories, 0, $args ) ); ...
0
votes
2answers
2k views

Displaying Metabox value (custom post type taxonomy)

I have been stuck on this for days, reading articles and articles and nothing works. I am trying to display the value of my metabox on a template page. I successfully added the metabox, and I see ...
0
votes
1answer
844 views

save_post action inside a custom metabox class not working

I am writing a class to create metaboxes and save the form data. The problem is, I keep getting a warning when I click "publish": Warning: call_user_func_array() expects parameter 1 to be a valid ...
1
vote
5answers
930 views

How do I get attachment_id?

This is trivial, but I can't really find an answer, I've seen some hints like search in database etc., but this is madness. Basically, I have a metabox with upload button that allows you to upload or ...
1
vote
1answer
1k views

Using radio button meta data from a custom meta box

Very new to attempting PHP and am hacking together my first plugin using tutorials.. I have a custom meta box with a Yes/No radio button on all WordPress pages (in the editor). EDIT- I removed the ...
2
votes
3answers
780 views

Editing Screen: Make Update or Publish Button Follow The Page

The Problem: I am currently in the finishing stages of a premium theme I've been developing and all is mostly well. For pages I have a few custom meta boxes for adding in slideshows and other ...
1
vote
2answers
2k views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using ...
1
vote
1answer
23 views

Metabox context for page post type

I would like to add a meta box underneath the title, but before the editor on a page post type in admin. I can add it to a post, but not to a page and I don't understand why. I've used this to add a ...
0
votes
1answer
21 views

Removing Meta Generator

I've noticed in the source of my page is shows in the meta generator Wow-Themes.com. I have been trying to remove this from the source using function rm_generator_filter() { return ''; } if ...
1
vote
1answer
39 views

how to sanitize checkbox input?

I've added meta box: checkbox on admin edit screen <input type="checkbox" name="changeposition" /> So how could we sanitize the input came from the checkbox as we do for input type text by ...
2
votes
3answers
1k views

Add custom field to existing meta box?

First off, I have been able to successfully implement custom fields within a custom meta box in Wordpress. I understand how this works. My question is, is there a way for me to add a custom field to ...
0
votes
0answers
16 views

WordPress loop by three meta values with random order

We have three custom fields with names plan_name1,plan_name2 and plan_name3. Need to check if these meta keys has values (1,2,3) OR (2,3,1) OR (1,3,2) OR (2,1,3) OR (3,2,1) OR (3,1,2) We mean ...
-3
votes
0answers
36 views

unable to pass array variable to select field in metabox

I'm using this code to get data from text type metabox..this will create an array $args = array('post_type' => 'locations_add'); $prefix = 'nilgiris_'; $the_query = new WP_Query($args); if ...
0
votes
1answer
29 views

How to Duplicate (multiple meta box)?

I've made a meta box field which works nice, but now i need to add one more. For the past few hours I've tried to mix every piece of it, to duplicate it, take some parts, google, search, and no luck. ...
0
votes
2answers
477 views

CMB select with data from CPT

I'm using the CMB framework for creating metaboxes (https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress) and I want to add a select box which prepopulates with titles from a custom ...
1
vote
2answers
946 views

Wordpress 3.5 Media Uploader - Only allow 1 upload and certain file types

I am trying to include the new WP Media Uploader in a Custom Meta Box. I found this tutorial: http://codestag.com/how-to-use-wordpress-3-5-media-uploader-in-theme-options/ However i am looking for ...
0
votes
2answers
996 views

How to make a metabox that contains link categories?

I'm looking for some suggestions or tutorial links about how to create a meta box that allows users to choose from a list of link categories. So far I've been looking at this post about taxonomies in ...
2
votes
2answers
820 views

How to Use WordPress Color Picker API in Custom Post Type Metabox

I have a Custom Post Type called "Banner" which has a custom Meta box with two advanced fields "Title" (text Field) and "Color" (color Picker). Can you please let me know how to use the WP Color ...
18
votes
9answers
23k views

meta_query with meta values as serialize arrays

I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in ...
0
votes
1answer
28 views

Problem with saving large amount of data in postmeta/usermeta

I am facing issues saving large amount of data in post meta field e.g. I have created a field Bio/description and put a huge amount of text in it. Now when I save it, it saves some of the text and ...
0
votes
1answer
34 views

Odd behaviour for the update button when displaying a WP_List_Table

I am currently trying to add a WP_List_Table to a metabox in the edit page of a custom type. The code is currently class Post_Table extends WP_List_Table { public function __construct() ...
0
votes
1answer
449 views

Multiple wp_editor instances in custom post type using Ajax

In a custom metabox, I need to generate a tinny wysiwyg wp_editor everytime we click on a button.. I struggled a lot with this and couldn't achieve it. The js $.ajax({ url: ajaxurl, data: ...
0
votes
0answers
9 views

Time blocking for publishing a custom post type

I'm looking for a way to replace the "time" input boxes on the post meta box. When scheduling a post I want to replace the time inputs with a dropdown populated from the database. When someone selects ...
0
votes
2answers
458 views

Include custom fields into the content of a regular page

Here's my setup: Parent "Gallery" page: _regular page, not custom type or anything _ Several "Project" child pages (could be as few as 1, unlimited number): also normal pages Child pages will ...
0
votes
2answers
589 views

Hide Meta Boxes for Non-Admins

I have a review based wordpress site where I have a page for each different company where there users can review them. The theme I use adds a custom post type called "review" and I have used Press ...
0
votes
3answers
2k views

Add multiple custom meta boxes to different custom post types

I want to add one custom meta box to a specific custom meta type "chifres" and two custom meta boxes to a specific custom meta type "presse". This is how far I've gotten: Here is my code: //Add ...
1
vote
1answer
2k 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
577 views

Help integrating Custom post type meta field with custom profile fields

I have a custom post type for "locations" and I need to have "users" log in and be able to pick a location that is within a certain distance from them. I have added some spots to the profile using ...
0
votes
0answers
24 views

Extend Metabox.io map field to sepearate lat long values

I am trying to separate the latitude and longitude values returned by the map field from the metabox.io plugin and save them as separate values. I have found a comment from the author (shown ...
0
votes
1answer
43 views

Warning: call_user_func() expects parameter 1 to be a valid callback, function

I keep getting this error when. I am trying to insert a dashboard widget and I don't know what's causing the error. Warning: call_user_func() expects parameter 1 to be a valid callback, function ...
0
votes
1answer
39 views

Adding Meta Box to Specific Submenu Page

I've created this page: function wpdocs_register_my_setting() { add_submenu_page( 'edit.php?post_type=task', 'View Tasks', 'View Tasks', 'manage_options', ...
0
votes
2answers
31 views

Get custom term meta problem on single post type

I'm trying to display a custom field value added to custom taxonomy on single custom post type. I have articles post type with custom taxonomy called issue. I used the code from Tax-Meta-Class to add ...
1
vote
1answer
495 views

How to add meta box to plugin admin page?

There is the codes. add_action('admin_menu', 'test'); function test(){ add_menu_page( 'Test plugin', 'Test plugin', 'manage_options', 'test_plugin_options', 'test_plugin_admin_options' ); ...
0
votes
0answers
34 views

Redirect to an anchor after click update button in a metabox (CPT)

On my Custom Post Type (CPT), I had multi metabox and I need to have some buttons to update each metabox. I use jQuery to trigger the submit event when a different element is clicked (see this answer ...
3
votes
3answers
3k views

Adding submit or update button to custom metabox?

I have alot of custom meta boxes, and the user has to scroll to the top everytime he wants to save the meta info. Is there a way to put submit buttons at every meta box that does that same as the ...
0
votes
0answers
21 views

Add custom field for users

I am using Metabox for a while and is a great plugin but I was using in pages and posts. Now I want to add a simple checkbox to users profile page, is that possible with Metabox plugin? Can any ...
0
votes
1answer
43 views

Filter posts of custom post type by meta key in (List All Section)

How can I filter the posts which are displayed on the admin list all page of a custom post based on the value of the a value. So far I know how to do the following anywhere on the front end: $args = ...
1
vote
1answer
114 views

How to add tab which is visible only in admin side of product in woocommerce? [closed]

I am new in wordpress development. I want to do add settings in a product page in a new tab. How to I add settings code That I tried to add Tab //add product tab link in admin ...
2
votes
1answer
365 views

How to remove items in quick edit panel-Function for remove items in wordpress quick-edit panel?

I need to remove some items in the quickedit panel .Let me know is there any way to hide product attribute list from quick edit window of product page in woocommerce? Currently iam doing this via css ...
1
vote
1answer
30 views

Undefined 'post_type' error on Add new page

I created a meta box for page see the following code: add_action('add_meta_boxes', 'add_metaboxes'); function add_metaboxes() { add_meta_box( 'wpt_slider_meta', 'Add Slider ...
6
votes
3answers
4k views

Add the sidebar/widget editor to the post edit screen?

There are (among others) two common ways of customizing the sidebar on an individual post: Create a new sidebar for the post, using code or plugins like Custom sidebars, WP Custom Sidebar, Per Page ...
0
votes
1answer
27 views

Error when adding Meta Boxes, but only when adding 3 with the same callback

I have 2 functions, one which removes the original meta boxes for 3 custom taxonomies, and one which recreates them in the desired location. The problem is that with all 3 removed, NONE of the meta ...