Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHello,
Do you mean that when getting the field value, if the meta box hasn't been saved yet, the
stdvalue is not returned?Well, if the meta box hasn't been saved yet, there's actually no values are saved in the post meta. Thus, the helper functions return empty string. Because the helper functions are just the wrap of
get_post_meta(), which connects to post meta to get the saved value.I'd suggest you do a check to see if the title is empty first.
The reason we don't set the
stdwhen retrieving field value is it's nearly impossible to differentiate a saved empty string (if users really want to save an empty string) to non-saved field value.Anh Tran
KeymasterI see. I fixed that bug 2 weeks ago. I've just released new version of the Meta Box plugin, please update it.
Anh Tran
KeymasterHello,
Unfortunately, the MB Revisions doesn't work with MB Custom Table yet. Give us some time to work on that.
Thanks
Anh Tran
KeymasterHello,
That JS part comes from the MB Conditional Logic extension. It uses WordPress's
wp_localize_scriptto output PHP variables to JavaScript. Any code that usewp_localize_scriptwill have similar output, because it's WordPress's behavior. So we can't do anything here.Besides, this is not an error, just a warning. In HTML5, to make things short,
typeattribute is not necessary forscripttag, but having it doesn't cause any harm or invalidation.Anh Tran
KeymasterHello,
When clone a field or a group, the values of that field or sub-fields will be cleared. This is the expected behavior so users can enter new values in the new cloned fields.
In case you want to keep a pre-defined value for a field/sub-field, please set
'clone_default' => truefor the field/sub-field (in this case, probably is the radio field). This parameter will auto set thestdvalue for new cloned field.Anh Tran
KeymasterHello, I tested with many active plugins:
Anh Tran
KeymasterHello,
I've just tried your code and don't see that bug. Here is my screenshot: http://prntscr.com/ijfpwy
The duplicated text looks like the meta box title. Can you check if it's somewhere?
Anh Tran
KeymasterHello, what is the output of print_r( $group_value )? Do you use prefix for group ID?
Anh Tran
KeymasterHello, I think your trick is the best way to handle that. Because the whole media popup is WP thing, we’re limited by its ability. Until now, I haven’t found a way to auto search like that.
Anh Tran
KeymasterMy bad :(. I forgot to update version on extension page. It should be fine now.
Anh Tran
KeymasterI'm not sure about this, because the way WordPress build SQL queries from meta query object is very complicated. I'll see if I can do something.
February 22, 2018 at 10:27 AM in reply to: Conditional logic not working with clones in groups #8591Anh Tran
KeymasterThanks for letting me know about that. Currently, handling removing images inside the media library is lack. It's kind of complicated. I will try to figure out from the Media Popup code later.
Anh Tran
KeymasterThanks a lot for your help! This CSS is for making sure inputs do not overflow the column width. I've changed the CSS and updated the plugin. Please let me know how it goes.
Anh Tran
KeymasterI've tested and it works for me. Did you add the field for an existing post? The
stdparameter only works for new posts, or posts that the meta box hasn't saved before. I guess your post has an existing meta box that already saved at least once before. Can you check that?Anh Tran
KeymasterHi,
Thanks for the greeting 🙂
The Custom Table extension hasn't incorporated with the meta query yet. Please use 2 queries to get posts: 1 for getting post IDs from the custom table and one for getting posts. This is the sample code:
global $wpdb; $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM your_table WHERE obh_note_associated_members LIKE %s", $post->post_author ) ); $query_args = array ( 'post_type' => 'obh_note', 'orderby' => 'meta_value', 'meta_key' => 'obh_note_date_time', 'order' => 'ASC', 'post__in' => $post_ids, ); //The query $member_notes = new WP_Query( $query_args ); -
AuthorPosts