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

learn more… | top users | synonyms (2)

0
votes
0answers
132 views

Meta box field in wp_query

I am working with a recipe site. I need to filter some meta box field in my wp_query. But I can't. I have searched in google 2/3 hours. No solution. Here is my code: // Meta Box Field array( ...
0
votes
1answer
131 views

How to check if meta box value is false for all posts then do something based on that

I have the following code in template-home page which queries for a custom post type, called reviews. I have a Meta Box for the Custom Post Type where I can write the Author, Article Link, an excerpt ...
1
vote
1answer
574 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
1answer
257 views

CMB2 metabox conditional logic

I am using CMB2 for metabox on custom posts. I am adding a metabox by using code below: $cmb_demo->add_field( array( 'name' => __( 'Test Text', 'cmb2' ), 'desc' => __( '...
0
votes
0answers
136 views

Image URL not added to Input Box from Media Library

I hope this posts correctly. This is my first time submitting a question here. I am uploading an image to a Custom Post Type - Meta Box. However when I upload the image to the media library the URL ...
0
votes
1answer
85 views

How do I save Multiple fields in a meta box?

Currently I am doing public function prfx_meta_save ($post_id){ if (isset( $_POST[ 'firstname'])){ update_post_meta($post_id, 'firstname', $_POST[ 'firstname']); } if (isset( ...
0
votes
0answers
18 views

meta boxes and about relationships

i see in this link http://jancbeck.com/articles/relationships-between-wordpress-post-types i can't find meta-boxes in last version of wordpress and heres the code i can't make it work <?...
0
votes
0answers
53 views

How to edit taxonomy terms fields directly from post editor?

When adding a custom taxonomy to a custom post type, a taxonomy meta box appears in the CPT editor where author can add terms to that CPT within the taxonomy. But the question is: Is it possible to ...
1
vote
1answer
206 views

How to hide meta box values from custom fields list?

I have created a metabox : function drama_description_metabox_markup() { global $post; $drama_description_metabox_markup = get_post_meta( $post->ID, 'drama_description', true ); ?> ...
0
votes
0answers
27 views

Image didn't load from taxonomy's custom meta field

adding some custom fields (image field) to custom taxonomy (issue) basing on code from (https://github.com/bainternet/Tax-Meta-Class), trying to out put the image attached to each taxonomy term by ...
1
vote
0answers
71 views

How to create a repeatable / reusable divs in the metabox?

I have a meta box: <?php function custom_meta_box_markup() { global $post; $meta_box_text = get_post_meta( $post->ID, 'meta-box-text', true ); $meta_box_text_day = get_post_meta( $...
6
votes
2answers
310 views

How do the 'tag' and 'category' (default) taxonomies do 'save_post' action?

I am trying to replace the categories metabox with what looks and works like the tags metabox because there's too much hierarchy and scrolling to check the appropriate categories and sub-categories ...
1
vote
1answer
52 views

What Can I Use To Add A Custom Button Between Publish button and Move To Trash?

I want to insert a custom button between "Publish" button and "Move To Trash" link. What can I use to make this? Here is a screenshot to make this clearer: I know I can use jQuery, but I want to ...
0
votes
1answer
415 views

Front end post and upload file, image for users without plugin

I have the condition as below :- There are multiple users who have to post their own post on respective post types(like news, reports etc) with feature image upload, extra file(pdf,txt,excel) upload ...
0
votes
1answer
25 views

Append custom field items to content from plugin

I know you can use add_filter( 'single_template', 'modify_page_template' ); function modify_page_template($single_template) { global $post; if ($post->post_type == 'post' || $post->...
0
votes
1answer
199 views

Meta box data is saved but NOT displayed in the meta box text field. Why?

I have a custom post type and I created it using the following code. /* DRAMAS */ register_post_type('dramas', array( 'label' => 'Dramas', 'show_ui' => true, 'supports' => array('...
0
votes
0answers
103 views

WordPress - Meta query with JSON value?

Im using post meta to store some value. Im having the following in wp_postmeta table: meta_key mykey meta_value a:2:{i:0;s:1:"5";i:1;s:1:"2";} I need to return posts which have meta_value of 2. ...
0
votes
1answer
316 views

adding ajax load more to display images from meta box

I am using metabox's advance file uploader to upload images. <?php $images = rwmb_meta( 'tj_file_advanced', 'type=image&size=YOURSIZE'); foreach ( $images as $image ) { ?> &...
0
votes
1answer
25 views

Metabox not being added

what is wrong with my code ? why it doesnt add meta box ? add_action('admin_menu', 'clivern_plugin_top_menu'); function clivern_plugin_top_menu() { add_menu_page('My Custom Page', 'My Custom ...
0
votes
0answers
66 views

do action inside a class is not working

I am trying to create my custom hook and call it from within a metabox class. Here is the pattern: metabox.php -- <?php require("libs.php"); require("test.php"); class metabox() { function ...
0
votes
0answers
18 views

Repeatable Metaboxes

I'm trying to add a repeatable field within another one, following this tutorial. http://code.tutsplus.com/tutorials/reusable-custom-meta-boxes-part-3-extra-fields So I need a main repeatable field ...
0
votes
1answer
15 views

Cusotm MetaBox content not getting saved

I have added the custom meta box to my custom post types, but it is not saving content on publish or update button click. /* * Custom book metabox */ // Add metabox function ...
0
votes
1answer
158 views

Get meta value when the page is a blog archive

I'm using custom metaboxes on my pages. For example: header icon. I created a page for the news on my site. I selected it as a blog archive page under Settings->Reading page. Unfortunately I can't ...
1
vote
1answer
19 views

Custom Taxonomy to dropdown box on adminside wordpress

Can I create a country- location hierarchy using custom taxonomy on admin side. When selecting a country from select box , an another box should see the list of location comes under that country. And ...
0
votes
0answers
18 views

Post meta ( select slider number )

So i have build a custom post where i show the 10 most recent post's in a slider (slick.js). I would like to setup a field inside the custom post where I can select a number from 1-10 to be used in ...
0
votes
0answers
114 views

How to create a “menu item” on the theme customize screen?

My question is, how do I create a menu item as seen below but on the theme's menu customize page? "Theme Menu Options" Show's up here, But it does not show up here, Here is the code I used to ...
0
votes
1answer
222 views

metabox select - frontend display

Hi I bought a theme but I need to add some fields to a frontend submission form. I added the metaboxes and they are working but the problem is the select type of metaboxes. I cloned a select form ...
0
votes
0answers
34 views

Priority conflict with custom metaboxes and built-in discussion metabox

I have a strange issue. I'm creating my custom metaboxes which have around 100 fields. I'm trying like this: function page_options_metaboxes() { $screens = array('post', 'page'); foreach( $...
0
votes
0answers
81 views

How to add file upload with wordpress metabox in proper way

I am new with adding custom metaboxes.I tried to add metabox with text but with file upload couldnt'hre is my code for text metabox function cd_meta_box_music() { global $wpdb; $musicLink = ...
1
vote
1answer
232 views

Set height of the categories meta box in post dashboard

How can I set height of the categories checkbox meta box? The one thats shows when we want to post a new article. I have found this https://wordpress.org/support/topic/change-the-fixed-heigth-of-the-...
0
votes
1answer
67 views

Custom metabox does not store data

I'm troubled with a custom metabox, could someone give me a helping hand? I've got a custom post type which uses it, but unfortunately it's not storing the data into the database. Any clue? ...
0
votes
1answer
20 views

Meta boxes not saving

I have a custom post with two custom meta boxes that I add using this tutorial:http://wptheming.com/2010/08/custom-metabox-for-post-type/ When I update the post, it disappears. My code: function ...
0
votes
2answers
234 views

wp_editor for custom post type doesn't save value

I have done this so many times but facing problems with meta boxes and wp_editor these days, lot of notices, errors and strange behaviour. I have been able to solve problem with meta boxes notices ...
0
votes
0answers
45 views

Remove metabox container and header

Is it possible to remove the whole header of my metabox (title+toggle icon) and the container (.postbox) ? I wonder I can use css to remove them, but is it the best solution?
0
votes
0answers
78 views

Can't save meta field value if the title not set

I'm using the example from WordPress Codex (https://codex.wordpress.org/Function_Reference/add_meta_box#Procedural) to add and save meta box values. Unfortunately I can't save the value of the meta ...
0
votes
0answers
211 views

Get custom meta box in custom post type using tag ID

I have a custom post type called Contacts, and in each of those post I have a custom meta box called number where a phone number is stored in each of the Contacts posts. I also have a custom taxonomy ...
0
votes
1answer
186 views

add wp_editor to custom_meta_box

Can please anyone help? I created custom meta boxes, two of them are in textarea. This is what i have: array( 'label'=> 'Ingredients', 'desc' => 'List of ingrediends', '...
0
votes
1answer
69 views

Change post template the proper way

I'm trying to create an option on edit posts screen (backend) to select different post template based the selection and I need your opinions guys if that is the proper way. Here is what I've tried so ...
0
votes
0answers
51 views

Need to make a “Meta Box” for Post search

I have a theme, where i can associate post with page there is called ( Hubs ) its part of the actually page. I have figure out so much that when i post a news about something, and it have to go into ...
0
votes
1answer
96 views

Undefined index: post in NOTICE while adding meta box

I am trying to add meta box on particular page with id 62. But i get the notice Undefined index: post in in line 5 i.e $post_id= $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; Following is the ...
1
vote
0answers
89 views

Create a Dropdown from Custom Post Type

I want to create a dropdown box that populates from my Contacts custom post type that I created. In my Contacts post I also created a meta box called Phone which stores a phone number. What I want to ...
0
votes
0answers
191 views

Display existing admin list table for custom post type in another location without recreating it

I have two custom post types; Inventory and Jobs. I have customised the columns displayed in the Inventory admin list table (ie. wp-admin/edit.php?post_type=inventory) to display relevant fields Is ...
0
votes
1answer
63 views

WP admin display custom field if another field value is “Female”

I have 3 custom fields: Gender, Partner name, and Partner last name. I need a js or CSS function. If I select "Female" from ecpt_gender select box, 2 custom fields appear by CSS changing the display ...
0
votes
1answer
60 views

Publish button inside custom field group

Is it possible to move the publish button out of the publish metabox, completely remove the metabox and then put the publish button inside the custom field group? Ask if you need more information, I ...
0
votes
1answer
423 views

echo value from 'select' field type into page template using cmb2?

I'm using CMB2 plugin to add metaboxes into a custom post type. I'm adding the additional metaboxes via functions.php onto child theme. It may worth to mention that parent theme/custom post already ...
0
votes
1answer
104 views

How can i add a custom meta box below publish box in CPT that will be like publish meta box and contain some html code?

How can i add a custom meta box below publish box in CPT that will be like publish meta box and contain some html code? See the attached shot for more info.
1
vote
1answer
225 views

Add pre-existing meta box to new custom post type

I have a parent theme that creates a number of custom meta boxes that are added to the "post" and "pages" post types as well as a number of post types also created by the theme. In my child theme, I ...
0
votes
1answer
39 views

Meta Box multi checkbox in template

I've used this check meta box in my functions.php but I don't understand how I can get the meta data. I'm trying to output if a product is still available or not. Metabox setup: /* Array of the meta ...
1
vote
1answer
375 views

Display oembed in repeatable metaboxs using CMB2

I'm using CMB2 to set up a repeating field of meta boxes but I can't find any documentation on how to get a repeating oEmbed field to display on the front end. With the code below I have the metabox ...
0
votes
0answers
184 views

Meta box from child theme

I've done some searching and can't find exactly what I'm looking for. I've found this, removing meta boxes but I need to add. I did try changing that to add meta box. I'm wondering if it is possible ...