Metabox image upload value

It appears that $field[‘custom_image’] isn’t passing what you want it to. The returned values do not appear to be correct. You want to put the key of the meta value you need as the second variable in the get_post_meta() function, for example: $image_upload = get_post_meta($post->ID, ‘_my_image_id’, true); Each custom meta field you create has a … Read more

display metabox on front end (my-metabox-class)

Nice to see people using my class 🙂 Anyway when you save a field in a repeater block , to access the data you need to use the repeater ID which in your case it’s $repeater_data = get_post_meta(get_the_ID(),$prefix.’re_’,true); and this returns an array of arrays with the id as key and value as value so … Read more

Custom Post Type Meta Box Text Input Field Won’t Save When Blank

The problematic line is this one: if (isset($_POST[“book_title”]) && $_POST[“book_title”] <> ”) update_post_meta($post->ID, “book_title”, $_POST[“book_title”]); That logic says: If the submitted form contains a field called ‘book_title’ and if the content of the ‘book_title’ field does not equal an empty string, then save it. In your situation, the first condition should be met (HTML input … Read more

Show array of meta_value in Edit Post Coloum

The error was here: (Thank you @Rarst) if ($column_name == ‘custom_checkbox_group_sesso’) { $sesso_occupanti = get_post_meta($post_ID, “custom_checkbox_group_sesso”, true); //check that we have a custom field if ($sesso_occupanti != “”) { // Separate our comma separated list into an array $sesso_occupanti = explode(“,”, $sesso_occupanti); //loop through our new array foreach ($sesso_occupanti as $sesso) { echo $sesso ; … Read more

Meta Box Plugin Cloned Fields – Multiple Foreach values

amit helped you out, but while we’re at it you really shouldn’t be echoing everything like that. Should probably try this instead: <?php foreach ( $videoID as $value ) { ?> <div class=”video-pops”> <a class=”thumb video-pop-lb” data-video-pid=”<?php echo $videoID; ?>”></a> <?php } ?> And so on. You may even be better off using the alternate … Read more