0
votes
0answers
15 views

How to save meta box check box values and show them on a post?

I added this codes on my child theme functions.php add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( 'my-meta-box-id', 'My First Meta Box', ...
0
votes
1answer
44 views

Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page

I have already published this on StackOverflow, but I realised it would be better to post it here instead. I am using the CMB script (Custom Meta Boxes and Fields for WordPress) for uploading files ...
0
votes
0answers
6 views

Incoming URL variables to custom metabox

Is it possible to take values from an incoming URL variable and write it to a custom meta box? My client has something like the following for a URL (marketing purposes): ...
0
votes
0answers
37 views

Undefined index error when saving content on metabox

I am trying to debug 'undefined index' errors on the WP backend when debug is set to TRUE. The offending lines are: if ( !wp_verify_nonce( $_POST['pdwt_meta_noncename'], ...
0
votes
1answer
88 views

How to store the value of a custom field dropdown select for post referencing?

I'm trying to reference posts to each other. Editors should have a custom field select list of certain post's titles to link the current post with other posts. I got quite far, I think. The select ...
1
vote
1answer
95 views

How to create a Custom Meta Box with Name/Value Admin User Input Fields?

I have researched many tutorials on how to create/add Custom Meta Boxes using the add_meta_box() Wordpress function. I can not find any example where the finished Meta Box has the option for an Admin ...
0
votes
0answers
18 views

Nested Meta boxes?

I am trying to set up a plugin that will add a meta box to the posts admin page asking one simple question: How many authors will add their 2 cents? The question is in a dropdown with a possible 4 ...
0
votes
2answers
75 views

Display custom meta box in my template file

Need help displaying my custom meta boxes on a template file. Following a tutorial Here's the code from my functions.php: function get_custom_field( $value ) { global $post; $custom_field = ...
0
votes
0answers
72 views

URL field in metabox with page links select

I am building my first metabox and I need to add special field when user can write your own link (URL) to outside page (with http://) or select existing page/post. If user selected that he want to add ...
0
votes
1answer
69 views

Hide custom metabox value from custom fields

Before I ask the question, I tried to added _ to the custom field, but it's not working, at least with my code. I just want to hide the value of my meta box from appearing in the custom fields. When ...
0
votes
0answers
57 views

Humanmade CMB | How to use checkboxes and radio buttons

I would like some help or advise for using checkbox and radio fields in HM CMB class. Where I am so far I've been using the class to add all types of fields to my projects, with repeatable groups ...
0
votes
0answers
89 views

add_post_meta to repeatable metabox from frontend

I'm creating new post from wordpress frontnend. I have managed to create post using wp_insert_post & added single metabox values using add_post_meta successfully. but I'm unable to set values of ...
0
votes
0answers
44 views

Use Custom Field As Meta Box In Post

I recently asked on this forum how to create a beta box using custom field, which was answered but with a not so right answer, but it helped me. For example, there's a custom field that I use called ...
-1
votes
1answer
84 views

Create A Metabox For A Custom Field

I add videos to my WordPress posts' video format by using custom fields. I was wondering if there is any way to create a meta box in post editor (like excerpt or something) for that specific custom ...
0
votes
0answers
81 views

Image MetaBox not saving in custom posts

I'm trying to create a meta box that will let me upload image in a custom post. Everything is working almost fine but... It doesn't save any data -.-' I can't figure what I'm doing wrong. Could you ...
0
votes
0answers
44 views

Extending select_post type in Custom Meta Boxes for WordPress (HumanMade fork) to store both ID and Post Title

I'm trying to figure out how exactly to extend one of the existing fields in CMB (HumanMade fork). I'm not terribly familiar with this process, so I'm looking for a suggestion of where to begin. The ...
0
votes
1answer
97 views

If custom field doesn't exist, or exists and it's true show title?

Im trying to add new feature to the theme and that's show/hide page title,but since i already have about 50 posts i can't go to all of them and save again just to save custom field values. So i tried ...
1
vote
3answers
407 views

How can I add a column/s to wp_posts table?

I am trying to sync WP with another service that offers an API that allows me to hook up their table's Update, Create, Delete to my sites. So when they create, update, or delete a row on their ...
0
votes
1answer
463 views

How to create Image gallery Metabox in wordpress [closed]

I want to create a metabox like woocommerce product gallery. I search on google find out related tutorial, plugin, example but unfortunately i don't get anything. So please, anyone can help me. ...
0
votes
1answer
35 views

How to validation for sanitize_URL?

Like sanitize_email validation is options available but sanitize_url options is available .if options is not available then how can i do this . http://i.imgur.com/WPYdkTb.png
2
votes
1answer
162 views

Automatically assign taxonomy term if custom meta value exists

I currently have a custom meta field for adding a video url to the post. I'd like for the existing taxonomy term "video" to be automatically assigned to the post upon saving if the meta field has any ...
0
votes
0answers
30 views

wp_postmeta are updated for only one page

Code below only updates wp_postmeta of one specific post, not all the posts. On other pages the meta_key is not even added to the table, so it is not the problem with saving but with something else, ...
0
votes
1answer
74 views

My meta boxes update wp_postmeta of posts but not of pages. What is wrong with the code?

I have a simple checkbox on posts to display posts in a slider, and everything works fine. But I want to switch and add only pages in the slider, but code below is not updating wp_postmeta table of ...
0
votes
1answer
60 views

Meta box values are displayed on Custom Fields list. Is it possible to hide them?

I have multiple meta boxes for my Custom Post Type posts. I want my users to add new fields using Custom Fields. The problem is - Custom Fields display all the garbage from my metaboxes and it might ...
0
votes
3answers
452 views

shortcode in a custom metabox

I am trying to add a shortcode from a plugin to my custom metabox. I have read it isn't the done thing but in this case i do need it to work. The client might not add a video but might add an image ...
0
votes
1answer
125 views

If metabox has content display content

I know how to display field content if the field has content. $monday = get_post_meta($post->ID, '_cmb_open_monday', true); if ( ! empty ( $monday ) ) { echo 'content'; } How do I display ...
0
votes
0answers
62 views

wordpress meta_box data don't save

I made this metabox with an input item and two select items(a dropdown and a checkbox). When i write something in the input item or i select something it disappear when i update the post. Another bug: ...
0
votes
0answers
83 views

Meta Box Data added to header redirect

I got a lot of my code from this post: Create more Meta Boxes as needed What I need to happen is the user input a code and it redirects them to a specific url. I know I'm grabbing the data correctly ...
0
votes
1answer
216 views

Any way to update_post_meta with html content? It gets stripped and becomes empty

So I am cloning some divs created from an array using jQuery. Here is an example. I have a drop down list that contains items to add to the meta box. The add button clones a hidden div based on the ...
0
votes
2answers
30 views

put saved metabox values back into fields and then display on the front end

i have a group of metaboxes which i finally are now saving but am struggling to get the saved values back into the input boxes they came from. so for example i have a meta field called link text and ...
0
votes
1answer
74 views

Custom meta boxes not saving

I am trying to create a custom meta box with 12 fields. there are 3 groups of 4 fields so i am using a for loop to create them to save on typing etc. for some reason i can't seem to get them to save. ...
1
vote
1answer
559 views

Create Multiple File Upload Metabox in Wordpress

I am trying to create a metabox to upload multiple files (can be images or files). Currently I have the upload field and its working file till the time we press upload and saving the data. The only ...
0
votes
2answers
3k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
1answer
582 views

Adding an extra parameter [string] to my posts' permalink?

I've been searching the internet for 6 hours now, so I decided to ask this in the forum and would appreciate every help. I just want my permalink to say (e.g. portfolio, post, etc) ...
0
votes
0answers
189 views

WPAlchemy repeating field creates duplicates

I'm using WPAlchemy to create a repeating image field. I am getting some very strange behavior from it. When I add the first image, it behaves as expected - the image URL is put in the image field. ...
2
votes
1answer
89 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
256 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
2answers
144 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
1answer
152 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 ...
0
votes
1answer
54 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
1answer
601 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
349 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 ...
2
votes
1answer
79 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 ...
0
votes
0answers
131 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
739 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
455 views

wp_editor removes paragraph from custom meta box

I have created a custom meta box like so: /*quote meta box*/ add_action('add_meta_boxes', 'quote_meta_box'); function quote_meta_box($post) { global $post; $post_id = $_GET['post'] ? ...
4
votes
1answer
419 views

Unable to get Preview of Uploaded image within a Custom Meta box

I first followed the steps in this tutorial. Added the Image Uploader, tried it out but I realized it's an older version of the WP Uploader... So I then found this post, and now my uploader is ...
0
votes
2answers
188 views

Custom metabox not displaying multiselect data in edit mode

I have a custom metabox in a custom post type that records system outages across the campus that I work at. One of the fields in the metabox is a multiselect box listing all the buildings on campus. ...
0
votes
1answer
356 views

Move Title and the Content WYSIWYG editor position

Right now, the Title is the first thing at the top of the page, then we have next the WYSIWYG Editor. I would like to add a Custom Meta Box and insert it before the title or WYSIWYG editor. How can ...
0
votes
2answers
55 views

Get meta field value of all catgories

I'm setting a meta field for the category and getting the meta value of each field like this: $cat_meta = get_option( "meta_field_$cat1" ); if (isset($cat_meta['color'])){ $cat1_color = ...