Tagged Questions

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

learn more… | top users | synonyms (2)

0
votes
1answer
677 views

delete post meta by AJAX

I make meta box to delete a specific post meta key for the post by AJAX i make a button when click , delete the key from DB by AJAX add_meta_box('delete_test_key', 'delete test key', 'testdel', ...
0
votes
0answers
18 views

Change core metaboxes labels [duplicate]

I am creating the oh-so-common Events custom post type and I want to use the published date as my event date. Eventually, in my archive, I will make sure to display posts with the scheduled status. I ...
0
votes
1answer
1k views

How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?

I have created a 2x shortcodes that displays a youtube video and vimeo video when the user enters the videos id in it, for example: [youtube id=""] [vimeo id=""]. Instead of entering this in my post ...
0
votes
2answers
56 views

Echo order box (in pages)

How can I echo the value of the order box in posts? See photo.
0
votes
2answers
53 views

Issues with Saving Dynamic Metabox

So I'm having issues regarding a Dynamic Todo List Metabox. It should be so simple, everything else is working except for saving. I've been looking at it for 5 hours now, and could do with some fresh ...
0
votes
0answers
101 views

Show Metabox Images in slideshow instead of static

I am using META BOX plugin from here http://wordpress.org/support/plugin/meta-box. The images which i add in pluupload uploader , these images show up as static images. What i need is to show them in ...
2
votes
1answer
84 views

make a excerpt on data from a meta box?

I have made a custom post type called news that has meta boxes. I would like to print the data from the metabox as a excerpt. How can I do that? This is the code that I use that prints the data : ...
2
votes
1answer
91 views

all tincymce's switch when updating page after changing from html to text in custom metabox

I have a custom metabox which uses wp_editor and when i switch to text editor instead of visual the main content tinymce also changes to text view when i update. I was wondering am i doing something ...
1
vote
3answers
326 views

Loading scripts to the Post Edit page only

I have added a few meta boxes for the posts and pages, so I want to load a js script only on the Create/Edit post and page. How can I do that? Currently I'm using following but that loads the scripts ...
0
votes
0answers
84 views

when saveing $meta_box i get Undefined index error

I need help to fix these Notices: PHP Notice: Undefined index: person-name in testimonials.php on line 112 PHP Notice: Undefined index: position in testimonials.php on line 112 PHP Notice: Undefined ...
0
votes
1answer
63 views

Script dependencies for post.js

I have already got the built in meta boxes displaying on the front, but some of them require the accompanying wp-admin/js/post.js to function correctly. I'd rather not rewrite anything here and just ...
0
votes
1answer
41 views

Data won't save if metabox within conditional in admin. What am I missing?

What is wrong with this setup? Metaboxes inside this conditional will not get saved. // Only shows for the admin front-page assigned page. $front_page_id = get_option( 'page_on_front' ); $post_id = ...
0
votes
1answer
263 views

Custom post type meta box empty after save

I'm trying to make a meta box to include a date picker but my initial attempt to have the textbox data seems to fail as each time its either posted or saved again the text disapears <? /* ...
0
votes
1answer
94 views

Metabox Input Not saving

I haven't made any meta-box's in quite some time so quickly threw together this one for a website I'm developing. My problem is that when I input some text in the box's and hit save the text ...
0
votes
2answers
130 views

WP Alchemy - stripping my paragraph tags from textarea metaboxes

I cant seem to get my custom Metaboxes to display paragraphs. Here is my code: page.php <?php // Custom Excerpt $custom_metabox = get_post_meta($post->ID,'_custom_meta',TRUE); ...
0
votes
1answer
124 views

JQuery multiple toggle values

I'm trying to hide/show metaboxes dependant on the page template chosen. This has been working fine until I have come to show a metabox on more than one chosen page template. The below code displays ...
0
votes
1answer
57 views

Query Custom Posts - Add To Selection

Which I have working, but not correctly. When I add this metabox to my page it messes up the permalink to always display the slug of one of the organization post types. When I remove this metabox the ...
0
votes
2answers
1k views

How to add editable/dynamic values to dropdown of a Custom Post Type Meta Box

I am new to custom post types so I might not be explaining this the right way (apologies), but I am developing a WP project based on football games - with a major part of this involving which teams ...
0
votes
0answers
69 views

Adding a Custom 'Now' button under 'Published on' header to return current date and time

I want to add a new 'Now' button under the 'Published on' header so as to return the current date and time to the post update time. This would help people who want to update their post with a recent ...
0
votes
2answers
155 views

Can i categorise my meta box?

I have this code <?php $prefix = 'wtf_'; $meta_box = array( 'id' => 'propertybox', 'title' => 'Property listing details', 'page' => 'listings', 'context' => 'normal', ...
0
votes
2answers
144 views

Hide metabox dependant on page template chosen

I'm using the following JQuery script from this answer to toggle the display of metaboxes dependant on the Page Template selected. The example below shows the featured image metabox when the default ...
0
votes
1answer
119 views

How to add a class to meta boxes (to customize them in CSS)?

I have an situation: I just can't figure out how to add classes to some meta boxes. I read these post from here, I tried this solution, but it did not work as I wanted. Is there a way to add classes ...
0
votes
1answer
184 views

Users Select inside custom metabox

I'm using human made's custom meta boxes framework (https://github.com/humanmade/Custom-Meta-Boxes). I want to add a select drop down in my metabox wich is populated from the users with multiple roles ...
4
votes
1answer
251 views

WordPress: Sortable Metabox Fields Not Saving Position

I've run into a problem that has got me stumped: after upgrading to WP 3.6 my sortable metabox fields are not saving their position when you re-order them. Below is my code: PHP: function save_box( ...
0
votes
1answer
58 views

HM CMB: Role Select

I'm using human made's custom meta boxes framework (https://github.com/humanmade/Custom-Meta-Boxes). I want to add a select drop down in my metabox wich is populated from the roles on my WP site. ...
0
votes
3answers
976 views

How to create a button click counter meta box?

I am trying to create button click counter meta box in a custom post type, but I can't get it to work. What I want to do is when a user click the submit button, then it will do update_post_meta in the ...
0
votes
1answer
366 views

Save JSON object attributes to custom metabox

Case: I use a imagepicker.js script to create a image picker for my custom meta box. But this doesn't work for WP 3.6 anymore, So i'm trying to create a image picker metabox with the new media ...
0
votes
1answer
710 views

How to get custom metabox image field?

i have custom metabox with the image field, i can upload image from wp-admin to this metabox, metabox code array( 'name' => 'Burst Image', 'desc' => 'Crop your image to ...
2
votes
2answers
431 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
2answers
213 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 ...
0
votes
1answer
191 views

Simple Custom Metabox Not Saving

I'm not quite sure why but I've been playing around with all kinds of different solutions but none seem to work. I've traded update_post_meta with add_post_meta and even broke it up into 3 ...
0
votes
1answer
153 views

Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”

My custom post type have a meta box that is listing another custom post types in its meta box. And it is causing error each time I try to publish a post with that custom post type. It is always bring ...
0
votes
1answer
41 views

Make meta box appear if the previous if not empty?

I have created a custom post type with the ability to have multiple featured images. However, it would be nice if i didn't have 10 empty boxes on the post page asking for images... I would like a ...
0
votes
0answers
145 views

Updating post meta and Meta Box plugin

I've installed Meta Box wordpress plugin and create a text field meta box with clone option: add_action( 'admin_init', 'rw_register_meta_boxes' ); function rw_register_meta_boxes() { $meta_boxes ...
2
votes
1answer
93 views

How WordPress autosave can save plugin fields?

Setup: WordPress Add/Edit Post/Page A plugin that have its own postbox with several hidden fields. Issue: How these custom hidden fields can be saved along with the other post data within the ...
1
vote
0answers
260 views

Set default value for radio button in WP Alchemy custom meta box?

I'm using the WP Alchemy Metabox PHP class (www.farinspace.com/wpalchemy-metabox/) to add a custom meta box with a radio select to a custom post type. The code below shows the code I'm using for the ...
1
vote
1answer
217 views

Simultaneous admin updates causes custom fields to not update

Okay, I have another doozie of a problem and although I'm still in the middle of trying to figure out exactly what's going on and what kind of help I might need, I thought I'd throw something up here ...
0
votes
1answer
50 views

quicktags “link” button doesn't work, but all other buttons do

I've added quicktags to a plain ol' textarea field which sits inside a metabox on a custom post type page. I can see the link button on the toolbar, along with the rest of the buttons, but when ...
1
vote
1answer
150 views

How do you List all Sidebars in a Metabox

I know this question has been answered many times before, including here where i came from so it'll probably be real simple. I've registered my sidebars as normal function wmw_sidebars() { // ...
0
votes
0answers
151 views

Filter CPT based on meta box value using Flexible Posts widget?

I'm using the Flexible Posts Widget to display a list of "deals" (a custom post type) in my sidebar. I'm also using that plugin's capacity to use a custom template to control the display of that ...
1
vote
1answer
926 views

Custom fields to save multiple values

I’m adding custom meta-box, by means of jquery I can create in it several custom fields with a key “test”. There can be one or several custom fields, but the key is only “test”. I can also delete key ...
0
votes
1answer
406 views

Adding Custom Metaboxes to Custom Pages

I want to be able to add a metabox to a new submenu page that I have created. I have the following basic code which I was hoping would work but it seems not to: add_action("init", ...
0
votes
1answer
124 views

Advanced Custom Field User Help URL

Hi I'm using ACF or Advanced Custom Fields which i saw here a while ago.. What i want is to output a second featured image in the homepage.. Question: 1 <div class="jpl-widgets-d" ...
0
votes
1answer
199 views

Custom post type in submenu with custom meta box as a title with custom html

I am trying to create a menu in wordpress using a custom post type as the main menu item at the top level and all of its childs are going to be included from the posts i create inside it. The html i ...
0
votes
1answer
138 views

I can't connect my custom jquery to wp admin

I am trying to figure out how to link a custom jquery to my custom meta box created in wordpress custom post type but I can't find it working. What I want to do is add a line of text when the button ...
0
votes
1answer
213 views

Image not showing using a custom function and get_post_meta

I'm trying to create a function to display either a theme option or custom images based on user input. So basically, it's a custom meta box. The user selects either a display header image OR they can ...
0
votes
0answers
99 views

Upload button in metabox not working

The upload button is not working when put inside javascript, but it works when I put it outside the javascript. /* -----------------------upload button------------------ */ function ...
1
vote
1answer
1k views

Custom Taxonomy as checkbox or dropdown

I have registered a custom tax to my CPT. On the edit screen the tax meta box appears with an autocomplete field. Is it possible to display it as checkboxes or dropdown instead?
0
votes
1answer
44 views

Why do Metabox use Nonces?

Why is it advised for admin panel metaboxes to use nonces? Every example I see of creation and saving metabox data there are nonces involved but aren't nonces a bit unnecessary in this case?
3
votes
2answers
3k views

Adding upload button in metabox

I want to add upload image button for the images and retrieve url. Can someone pls help me, i have been trying this for quite a few days. I'm using code from this thread Create more Meta Boxes as ...