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

learn more… | top users | synonyms (2)

0
votes
1answer
894 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 ...
0
votes
0answers
10 views

Add Template Selector Drop-Down to LearnDash Custom Post Types Array

I have a set of functions that I found online which add a meta box for templates to my WP Post editor and it works perfectly (http://pastebin.com/0WdPAWM1). I tried to modify it to be applied to an ...
0
votes
1answer
25 views

after checked the checkbox in backend, dont show social link on frontend

I want to do something like if I checked/unchecked a checkbox in admin then all social links in the page footer on fronted hide/show. function add_custom_meta_box() {add_meta_box("demo-meta-box", "...
0
votes
2answers
546 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 ...
0
votes
2answers
20 views

How to set page title tag in custom template for non-Custom Post Type?

I have this code in my custom template file: <?php /* Template Name: custom-template-view */ ob_start(); get_header(); function assignPageTitle(){ return "my page title"; } add_filter('...
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 ...
1
vote
2answers
620 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 ...
-3
votes
0answers
20 views

How to show map using the following code?

I am using following code to show map on contact page.But it is not showing up.How can I resolve this problem? add_filter( 'rwmb_meta_boxes', 'your_prefix_map_demo' ); function your_prefix_map_demo( ...
0
votes
1answer
19 views

Singleton Custom Field (Meta Box)

How do I create a custom meta box for posts which have a boolean data type and can be true only for one post. I want it to be falsified for all other posts when it's set on one post. Is there a hook ...
1
vote
3answers
322 views

save_post action to include wp_insert_post_data filter, gathering meta field info & prevent infinite loop

Im trying to change the title of a post, but I want to include info from a meta field, the value of which isn't saved to the database until after the posts has already been saved. Other than this one ...
2
votes
1answer
1k 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
0answers
25 views

Button inside Custom Meta Box triggering the Update Button

I have a custom meta button that adds additional custom meta fields inside the custom meta box. This meta box, in particular, gives me a choice to enter a particular skill and rate my own ...
1
vote
2answers
324 views

Display custom post on home page based on a metabox selection

I am trying to display an post to my home page based on a selection. What I mean is in the backend I have a custom post that has a metabox labeled Assign to Home with a drop down that has a selection ...
1
vote
1answer
342 views

I'm confused about URL sanitization in meta boxes

I'm making a meta box for a custom post and this meta box will contain a href value. I don't need any validation as this is a valid href value but I would like to do this in a way that's secure. I ...
0
votes
1answer
20 views

Render the metabox input values as HTML

I'm new to PHP and WordPress. I've created a site on WordPress, where the user can add an HTML code snippet (the inputs are taken using a metabox and displayed). The problem is WordPress doesn't ...
0
votes
1answer
468 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
2answers
510 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
15k views

How to add multiple images to custom post type?

I would like to create a simple plugin to add multiple images to a custom post type. I have created a plugin to add a single image to a custom post type, but I am unable to figure out how to add ...
0
votes
1answer
421 views

Save Metabox Custom Field Value

I am using this code to show post type dropdown to select available post types but when i submit the post it restores the value back to post, how can i make sure it saves it? <select name='...
0
votes
2answers
21 views

Inserting Plugins Into Blank Space of Externally Designed Wordpress Theme

I am currently working on this website which uses a Wordpress theme designed by one Themeforest author. As can be seen via the link and the following screenshot from the same page, the theme's ...
2
votes
1answer
49 views

Add comments meta fields to comments metabox on post edit screen

I have few custom fields in comment form. How can I add these fields to comments metabox? I divide my question on 3 parts: 1) How to remove url field and add custom comment fields to comment quick ...
0
votes
4answers
463 views

Set the default value as checked for a meta box checkbox

This is code generated here and I made a few very small adjustments for customization. The problem I'm having is that I can't get the default value for the checkbox to be checked. If I manually add ...
1
vote
2answers
974 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. However, I am looking for a way to limit the uploader to only accept certain types of files like '...
1
vote
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
1answer
18 views

Can I save post meta programatically without setting metaboxes?

I want to know if is it required to have metaboxes set to save post meta into a custom post type. I have a couple of pages where I save metadata into a post programatically, using add_post_meta, but ...
0
votes
2answers
543 views

Allow iframe in custom meta box

I've created a custom meta box called 'Location Map' and want to provide a functionality to the client to simply copy paste the location's google map's iframe embed code so that it directly appears on ...
0
votes
3answers
434 views

Custom meta box in custom post type not working

As a wordpress newbie I am having problems in adding custom meta box in my "slider" custom post type which I used in some old wp theme. I'm getting a warning: Warning: call_user_func() expects ...
1
vote
1answer
37 views

Why is my Custom Meta Box Field Inputs NOT saving?

I have a custom post type labelled 'web_design' and I want my 'web_design' posts to have the following custom fields: 1. 'client' - Client Name 2. 'exlink' - External Link 3. 'datefin' - Date Finished ...
0
votes
2answers
4k views

Create custom taxonomy and Display in metabox dropdown

I'm looking to create a dropdown in the post edit screen which contains 3 already existing tags. What's the easiest way of doing this? Basically all I'm looking for is a simple drop down which adds ...
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 this:...
1
vote
2answers
890 views

Force hide custom field metaboxes

How can I completely remove the custom fields and the collapse button in the Edit Post/Edit Page custom screen, but without removing the capability to add custom fields with a PHP function?
0
votes
0answers
9 views

Save and return input type is text on custom post type

I've got the following problem, and have been looking for way too long to solve it. I've made my custom post type, and custom taxanomies, and those all work great. But now I want a custom fields to ...
0
votes
1answer
434 views

Show value of select dropdown in meta box

I have created a meta box which has a select dropdown list and i want to show it in the post as a user selects a particular option from meta box.I cant figure it out how its done.Here is my meta box ...
0
votes
1answer
22 views

How to show metabox just in post.php in admin?

I want to show my metabox in post.php?action=edit not in post-new.php. How can I do that?
1
vote
2answers
31 views

Custom metabox for custom page template

I have created custom page template. Now I have to make it configurable, however since I am using more than one template in my theme I would like to make sure that configuration will be available only ...
0
votes
1answer
30 views

Metabox saving values

I have 2 metaboxes ("prices" and "dates") on my custom post type ("kvkoolitus") edit page. As I thought right, wordpress saves values only from first rendered metabox. Each metabox code stored in ...
22
votes
10answers
25k 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 ...
3
votes
3answers
5k views

Remove the Featured Image Meta Box

How can I remove the Featured Image meta box? I've tried using the remove_meta_box function and specifying the boxes ID but it doesn't seem to work like it does for the other native meta boxes. ...
0
votes
2answers
1k 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 ...
0
votes
2answers
466 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
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 ...
0
votes
1answer
499 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
2answers
23 views

Custom taxonomy hide meta box but show in menu

If set show_ui false, this hide the taxonomy meta box and admin menu link both, how to hide only meta box? $args = array( 'hierarchical' => true, 'labels' => $labels, ...
0
votes
2answers
449 views

get_post_meta as a list for drop down search filter

I was wondering if someone could help me out. I would like to create a dropdown search filter for my wordpress site. I would like the drop downs to be populated by meta_boxes values which i have for a ...
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 ...
6
votes
3answers
4k views

Make Custom Metaboxes Collapse by Default

I've created some custom metaboxes for my post write screen. Is there any way to make some of them display collapsed by default? Just in case I'm not using the correct terms or not being clear in ...
0
votes
1answer
380 views

how to reset metabox excerpt to open

For some reason the excerpt box on the new posts page (post-new.php) is always closed. I can alter that with firebug, but it should be open anyway. There is a "closed" class being added by someone ...
0
votes
1answer
608 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
1answer
522 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 ...
1
vote
1answer
258 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-...