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

learn more… | top users | synonyms (2)

-1
votes
0answers
22 views

Cannot save Meta Data in custom post

I am trying to wrap my head around Wordpress, and am really sturggling to understand how to save custom data. I have tried so many different ways, I have forgotten what I have even tried. // Custom ...
2
votes
2answers
30 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
21 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 ...
4
votes
2answers
104 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'] ) ) ); ...
1
vote
1answer
24 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 ...
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
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
1answer
25 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
23 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
42 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 ...
0
votes
0answers
17 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 ...
0
votes
1answer
30 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. ...
-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
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
29 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
0answers
10 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
0answers
25 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
45 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
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 ...
0
votes
1answer
40 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
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
119 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 ...
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 ...
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 ...
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 ...
0
votes
1answer
23 views

Add URL to selected post in meta box

How can I change this code $posts = get_posts(array('post_type'=> 'lesson', 'post_status'=> 'publish', 'suppress_filters' => false, 'posts_per_page'=>-1)); //here you add the ...
0
votes
0answers
16 views

Wordpress Costums Field Comment Box on Admin Page (Post Editing)

can help me about wordpress comment field on post editing in admin page? i want to change the default form like picture above : to like this...
0
votes
0answers
27 views

Move Meta Boxes for Custom Post Type

I'm trying to move the metaboxes for a custom taxonomy from 'side' to 'normal'. Unfortunately, when I remove_meta_box for the 'side' position, it breaks the 'Add term' functionality and I can't figure ...
1
vote
1answer
50 views

How to select the contents in the text view textrea in wp_editor?

I am trying to count words among other text stats entered into the default post editor (wp_editor). Its supposed the write word count out to <div id="word count"> in the meta box immediately ...
0
votes
2answers
53 views

Creating alternate meta box context locations

I am trying to create two additional add_meta_box context locations ('after_title' and 'after_editor') within posts. This doesn't appear to do what I think it should. The meta box does appear on the ...
0
votes
0answers
19 views

How can I create a dual drop down metabox?

I'd like the first dropdown to be for the terms of a taxonomy and the second to be for the posts associated with those terms. So far I have got: /* Hook meta box to just the 'place' post type. */ ...
2
votes
3answers
207 views

datetime_timestamp shows numbers only? need in date and time

I am using CMB2 and following code to select date & time: $cmb->add_field( array( 'name' => __( 'Test Date/Time Picker Combo (UNIX timestamp)', 'cmb2' ), 'desc' => __( ...
0
votes
0answers
29 views

Filter on page with meta box post values

it's possible create an filter using the values of the meta box posts? Example: Name of message: Message one Year of the message: 2016
0
votes
0answers
26 views

How to Display Audio File List Using Custom Post Type

Using this plugin, I've created a meta box for my custom post type to display a list of audio files for download, but the combined code does not output anything. single-promo.php ...
0
votes
0answers
25 views

modify my custom meta_value after change post status from future to publish

I write a custom metabox form my wordpress. This is a check-box to flag some posts and this is work perfectly. To day I've try to schedule my first post and I've flagged this. Well, after publications ...
0
votes
2answers
26 views

If metabox fields has content display content

I am try to hide the metabox fields with empty value like $Product_Brennwert = get_post_meta(get_the_ID(), 'Product_Brennwert', true); if ( ! empty ( $Product_Brennwert ) ) { echo 'Brennwert '. ...
1
vote
1answer
38 views

How to remove/hide the predictive autocomplete popup when I type in the tag/term metabox

When I start to type in a few letters in the tag or term metabox (in the post edit page) there is a predictive autocomplete popup thingy containing other tags/terms to choose from. How do I ...
0
votes
0answers
19 views

How to avoid duplicate post entry admin page

I am building a cinema website with different custom post types. How do I avoid duplicate post entries? For example, I have a post type: Trailer First I add a trailer Terminator. After if I add ...
0
votes
1answer
34 views

Is this Edit Post Screen?

I need to add fields to a metabox based on whether the user is on the Admin Add/Edit Post screen rather than the Admin Add/Edit Page screen? I've tried using get_current_screen() but due to the ...
0
votes
0answers
22 views

Attachment checkbox metabox will not update with update_post_meta

I've followed this tutorial for adding metaboxes to the attachment post type. The problem is that the metabox checkbox value is not updating to 'off' when it is unchecked and goes through the ...
0
votes
1answer
93 views

Can custom fields be added without a meta box?

I'm building a custom post type entry screen (in code). I would like to have my fields display without a meta box surrounding them, so that they look more like the user profile page. Is that ...
0
votes
1answer
29 views

Resposive admin classes?

Does WordPress have default classes that makes possible to use several (resposive) columns in admin area / meta boxes? Take a look at the example below: I need inputs to be in separate columns. Yes, ...
0
votes
0answers
36 views

Meta Box Plugin - Adding field value inside echo

I am using Meta Box Plugin to add some custom options to my Page Edit. I added a field to add an image background to the header which is working great. This image background has a parallax background ...
0
votes
1answer
35 views

wp_dropdown_pages doesn't allow me to select more than one custom post type

I am creating a "wine database",k to call it somehow.... Basically there is a custom post type called "wines", and then it has attributes as vintage, grape color..... and also, "region" and ...
0
votes
0answers
32 views

custom meta boxes to dispay for specific categories

I'm new to WordPress and I am learning everyday. Being a newbie I am not being able to handle / solve a problem. I am currently working on a lighting website that will sell light bulbs, ballast and ...
0
votes
0answers
10 views

Redesigning the add new post form

This is a learning exercise. I'm trying to redesign the form that is rendered when a user tries to add a new post via the administration panel. So far i've tried messing around in ...
1
vote
0answers
23 views

Render P2P metabox per taxonomy term

I would like to display a Posts to Posts connection registration metabox for each term in a custom taxonomy. The post connection candidates will be split across the metaboxes depending on their term. ...
1
vote
1answer
33 views

Best Way to Remove WordPress Meta Box based on Post Status

I recently wrote a WordPress plugin called Organize Drafts, which creates a custom taxonomy called Draft Types (using the slug lswdrafttype). This taxonomy is used to organize drafts of pages and ...