Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
2 votes
1 answer
4k views

wp_handle_upload error "Specified file failed upload test" but still creates attachment?

Having a bit of trouble with an image upload custom meta box. What happens is the uploaded image is created as an attachment but the wp_handle_upload seems to kick back the error "Specified file ...
daveaspinall's user avatar
5 votes
2 answers
6k views

Why won't my metabox data save?

I have a custom post with a lot of meta boxes. I recently tried to add some dynamic metaboxes, using this question: Create more Meta Boxes as needed I managed to get the metaboxes to add nicely, the ...
gillespieza's user avatar
  • 1,285
0 votes
2 answers
322 views

Make separate text boxes for separate WordPress Custom Fields

I am trying to make usability of WordPress custom fields admin easier in my theme. I saw it in ElegantThemes' eStore theme. Only I couldn't figure out how to do it in my custom theme because I couldn'...
Aayush's user avatar
  • 103
0 votes
1 answer
1k views

How to get value in radio input in post meta box?

I use this code when create input box for post meta box: <input type="text" name="<?php echo $name; ?>" id="x" value="<?php echo $value; ?>" /> Now I need to handle radio box which ...
Jenny's user avatar
  • 1,767
0 votes
3 answers
1k views

How to display multiple $meta_boxes into separate tables

i am writing a plugin inside a class and i have created my $meta_boxes, i am able to retrieve all fields but they are duplicated and in the same table. this is my code for add $meta_boxes function ...
mic3000's user avatar
0 votes
1 answer
280 views

Include a metabox in the 'home' screen of a custom post type? If not, then the dashboard page?

I have a page with a simple YouTube embed. I would like the client to be able to easily switch the video id from the dashboard without having to edit any templates. Something like this: <iframe ...
jwp's user avatar
  • 169
7 votes
2 answers
13k views

How can I retrieve multiple get_post_meta values efficiently?

I am looking for a solution to returning multiple get_post_meta values... Current I am using a meta box array as follows: $meta_boxes[] = array( 'id' => 'setlist', 'title' => 'Setlist ...
mmaximalist's user avatar
1 vote
1 answer
892 views

TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2

I want something very simple: a custom metabox with a TinyMCE editor in it. The following code help me achieve that easily in 3.1.4: add_action( 'add_meta_boxes', 'add_metaname_box'); function ...
Eugene's user avatar
  • 45
4 votes
4 answers
8k views

Tinymce/Wordpress is removing all line-breaks?

In my wordpress theme, I have a custom options panel with textareas that utilize the tinymce script included with wordpress. This was working fine until I upgraded to the latest version of wordpress (...
Levi's user avatar
  • 43
0 votes
1 answer
317 views

$_GET & $post_ID

I got a set of meta boxes containing different form fields. All of them are build inside a set of classes. Now I have the problem that I have to hook the construction of the fields early enough to ...
kaiser's user avatar
  • 50.8k
2 votes
2 answers
7k views

How do I stop HTML entities in a custom meta box from being un-htmlentitied?

I have a custom meta box that is supposed to accept HTML, but the text I'm trying to input contains both double and single quotes (and ampersands), and it's messing up the saved data - each time I ...
gillespieza's user avatar
  • 1,285
5 votes
1 answer
11k views

WP_Query with checkbox meta_query

I have posted this on StackOverflow too, not sure if that's allowed - if not let me know and I'll remove one (I don't want to look like I'm spamming). Anyway.... I have a custom post type and have ...
Adam Moss's user avatar
  • 1,062
1 vote
1 answer
407 views

Creating an "admin only" meta box with WPAlchemy. Getting a fatal error on front-end when using current_user_can

I'm trying to create an "admin only" meta box using WPAlchemy. The box for example may contain a "feature post" check box and other functionality. How can I show this meta box for only the admin, ...
Andrew's user avatar
  • 1,163
0 votes
1 answer
519 views

Custom meta box data in rss feed

Im using WP Alchemy to set up some custom meta boxes. Since these are being used for audio files, when I create a feed the data does not come in and i cannot create a podcast feed for them.
shelomo's user avatar
  • 11
0 votes
1 answer
540 views

How to remove the RichText Meta Box

How can I remove the rich text box editor in WordPress? I have used the remove_meta_box function specifying the boxes ID, but it does not work like it does for other core meta boxes: The code I tried:...
Nenad's user avatar
  • 101
0 votes
2 answers
511 views

how can we bring category metabox to Media Library/Upload New Media Page

I would like to place the 'categories metabox' found in new post/edit post page in the "upload new media" page. Any clues ?
Kid's user avatar
  • 51
1 vote
2 answers
939 views

Add TinyMCE to CPT metaboxes in 3.1?

Been looking around for an alternative to this method: http://allcreatives.net/2011/02/02/using-the-native-wordpress-tinymce-wysiwyg-editor-with-your-custom-post-meta-textareas/ To add the WYSIWYG ...
INT's user avatar
  • 1,281
1 vote
2 answers
644 views

What are 'authors' in Wordpress, and is there an author 'metabox class' available anywhere?

I am trying to outline a new project where I want to give my users the ability to customize their 'profile' pages in my website theme. Concepts like adding in their own background images, choosing ...
shawn's user avatar
  • 742
1 vote
1 answer
5k views

How to modify Publish metabox?

I'm trying to remove "Pending Review" (Status) and "Password protected" (Visibility) options from Publish metabox. Any ideas how can I do it?
Kovas's user avatar
  • 433
5 votes
2 answers
1k views

Add custom fields within meta box class "on the fly"

I'm one of the contributors for the Meta Box Class here on Github (link) and before I get too deep, I wanted to ask if anyone knew of a straight forward way to allow users to add additional fields "on ...
Norcross's user avatar
  • 3,077
4 votes
1 answer
2k views

How to group meta boxes on the post edit page

I suspect that this is not possible right now, but oh well.. I'll ask, maybe one of you has some intersting thoughts to share. So let's say we have the following taxonomy terms meta-boxes on our post ...
mike23's user avatar
  • 6,029
1 vote
3 answers
1k views

Change Metabox Title

Anyone know of a way to change the title of the core Wordpress metaboxes on a post edit screen? I'm trying to alter the title of the "Featured Image" metabox and have found a way to edit the contents (...
user avatar
2 votes
1 answer
7k views

How to construct multiple meta boxes

As of now I have a perfectly working script for a single meta-box. (I'll supply the details below.) However, I want to add more meta-boxes but am having trouble wrapping my head around how I would ...
mmaximalist's user avatar
2 votes
1 answer
2k views

TinyMCE with custom buttons on a meta box

Firstly please allow me to apologise - my fourth question in the week that I've been here! You've all been very helpful though, which is why I keep coming back.. I'm trying to put together a custom ...
turbonerd's user avatar
  • 1,237
9 votes
2 answers
4k views

How can I create a taxonomy meta-box with search suggestions but no new terms input?

I was wondering how I could setup a taxonomy metabox on a post edit page that would be similar to the "tags" kind (with search field and automatic suggestions), but without the right to add a new term....
mike23's user avatar
  • 6,029
0 votes
2 answers
3k views

Working with multiple values and metaboxes

I have multiple values I need to be able to punch into a meta-box on the post edit screen. EX: I am working with set-list information for concerts. Song 1 Song 2 Song 3 etc... I am always ...
mmaximalist's user avatar
0 votes
3 answers
3k views

Displaying Meta-Box Data Properly

Quick and dirty, I have meta boxes pertaining to concert information. (i.e. venue and location) and am trying to figure out how to properly display them in my post. At the moment to display the meta-...
mmaximalist's user avatar
0 votes
1 answer
2k views

Custom select box meta field

For my custom post type i needed to add the Attribute Meta box, but i wanted to add an extra field to it. So here i have copied the Page Attribute meta box code and added my select options, but i ...
cnotethegr8's user avatar
4 votes
2 answers
3k views

Using media-upload.php to upload mp3 via custom fields

I'm trying to use the Thickbox file upload dialogue with a custom field to allow the user to upload an mp3. What I want to do is to grab the URL of the uploaded mp3 and save it as postmeta (saving the ...
Richard Sweeney's user avatar
0 votes
2 answers
364 views

How can i use this meta box function in my template ? (Wordpress)

this is my function : $prefix = 'dbt_'; $meta_box = array( 'id' => 'my-meta-box', 'title' => 'Custom meta box', 'page' => 'post', 'context' => 'normal', 'priority' =&...
l2aelba's user avatar
  • 857
0 votes
1 answer
629 views

List all sidebars in metabox

I'm trying to add a metabox to select a sidebar per page. In order to create the metaboxes I use this class The construction is fairly easy: $meta_boxes[] = array( 'id' => 'sidebars_side', ...
Jukov's user avatar
  • 423
0 votes
1 answer
388 views

Why is save_post triggered even when I havent saved the post

I created a meta box I notice that save_post seems to be triggered when I land on the page, thus giving me errors like Undefined index: xxx in /data/www/ae/wp-content/themes/xx/functions.php on line ...
JM at Work's user avatar
  • 2,323
1 vote
3 answers
9k views

Get the term id belonging to custom taxonomy on a custom single-post-type.php template page

I have custom post-type 'sermon' with custom taxonomy 'speaker' attached to it. I wanted to assign custom meta values to the speaker taxonomy, so I am using the taxonomy meta class from Rilwis: http:/...
shawn's user avatar
  • 742
0 votes
1 answer
4k views

How to get the value of particular get $meta value in wordpress

I am using this wordpress Script to add metaboxes under posts.. I followed as it was written.. but I am having trouble on how to get those values in singe.php Example an uploaded image Please guide me ...
nickfrancis.me's user avatar
1 vote
1 answer
467 views

Is there a need for nonce with Post Metabox?

I looking at the docs for add_meta_box. They used a nonce. wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' ); I am wondering, probably the save post form itself should already ...
JM at Work's user avatar
  • 2,323
49 votes
2 answers
25k views

Create more Meta Boxes as needed

I'd like users to be able to create and remove additional meta box fields as needed. For example, say a music podcast with a variable amount of songs played per episode. The user should be able to ...
Picard102's user avatar
  • 933
3 votes
3 answers
5k views

Loading scripts & styles from a meta box callback function

Case: I got a set of classes that build form fields based on data from an input array. The class can build the following types of form fields: input (basic, hidden, password) textarea radio checkbox ...
kaiser's user avatar
  • 50.8k
0 votes
4 answers
23k views

Sizing textarea field in custom metabox

Here's the code for a custom metabox. Very simply, how would I resize the textarea box? I'd like to add an expression such as cols="50" rows="5". // Echo out the field echo '<p>Enter the ...
user5486's user avatar
  • 163
0 votes
1 answer
482 views

create relationship between posts from one category and posts from another category

What I'm trying to do is adding in a post admin page a meta box, dynamically listing all posts from another category in the for of a check box list. This way I can create relations between a post and ...
Boldhand's user avatar
0 votes
1 answer
500 views

show_option_none not working in meta box

I have the following code going into a meta box: function multi_author($post, $box) { $currentAuthors = esc_attr(get_post_meta($post->ID, 'multiAuthors', true)); if ($currentAuthors) { $...
Tom Jenkins's user avatar
0 votes
1 answer
689 views

Let's Create Custom Field Template Documentation

I've been using the Custom Field Template plugin for a while now, and I really like it. It's fantastic for adding quick custom field meta boxes in the wordpress back end. It handles TinyMCE, file ...
dwenaus's user avatar
  • 1,251
2 votes
1 answer
1k views

Using WPAlchemy metabox values in another metabox

I'm building a quite complex custom post type structure and I would need some help regarding my metaboxes. What I want to do: Thank's to the have_fields_and_multi() function, the user enters data in ...
Sinklar's user avatar
  • 191
0 votes
2 answers
1k views

post meta - problem : copy the same meta for all the articles

i created a post meta, to add the name of a specific "author" to my articles. But if i enter the meta of the first article, all the other articles copy the same meta. If i enter then a second name in ...
Paul_p's user avatar
  • 151
9 votes
1 answer
4k views

Taxonomy dropdown metabox in the back-end

I've created custom taxonomy called Brands and made it hierarchical so I can add Car brands and models there and keep their relations, like this: Ford Mustang Mondeo Focus Problem is, this list ...
Kovas's user avatar
  • 433
0 votes
1 answer
414 views

Upload attachment from external site

For example, we have some image on the external site: http://site.com/image.png How do I upload this image to my wordpress as an image attachment by php? Image should be copied to my uploads folder,...
ilovewordpress's user avatar
0 votes
1 answer
1k views

Parse a text area custom meta box and assign as value to existing meta keys

I built a post interface to accept specific data in the form of custom meta boxes [rant]but now the end user says it's too much work to cut and paste 4 times[/rant]. So now (completely out of ...
Chris_O's user avatar
  • 20.6k
6 votes
4 answers
4k views

add meta box - custom field : which to choose?

i've just find out about the custom field, which makes it possible to add something near a post, but what is the difference between "add_meta_box" and "custom field"? Custom field is inside the "...
Paul_p's user avatar
  • 151
0 votes
3 answers
1k views

Custom metabox translation

I have created a custom post types and added some custom metaboxes and now I am wondering witch translation plugin I use for my site? I don't have experience with none of them, so I don't know who ...
Kaspars Milbergs's user avatar
1 vote
1 answer
819 views

Populate Custom Fields in a Custom Post Type?

I want to set up a basic 'post rating' system for my site - I don't want to use a plugin - so I want to add the custom field 'rating' to each new custom post and populate this field with the number 1. ...
edzillion's user avatar
  • 369
0 votes
1 answer
644 views

add a "list" into add meta box : problem

i found a code searching through stackexchange --> to create a "list" inside a meta box of a custom type, BUT, i don't see anything appearing in this meta box, except the input field (which comes from ...
Paul_p's user avatar
  • 151