Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi catarinacarraro,
I've just tested with your code and I see the
stdvalue works, the radio with value "Em" is checked by default:
Anh Tran
KeymasterI'm really sorry that you have spent much of time searching for the solution. I was on a holiday last week and couldn't answer you sooner. Hope you be generous and still love the plugin.
Anh Tran
KeymasterHi, in order to convert data from 1 format to another format, you need to understand how data is saved in the database. Here is the documentation for this. For group, data is saved as an array, each element of which is the value of sub-fields.
In this case, if you are using simple
textfield, your data is just multi rows in the database, so getting values will not be a big problem. But I'm not clear how you want to put them in a group? Will the text field is a sub-field of the new group? If so, you can use the following code:<?php $text_id = 'TEXT_FIELD_ID'; $group_id = 'GROUP_FIELD_ID'; $posts = get_posts( array( 'posts_per_page' => -1, ) ); foreach ( $posts as $post ) { $text = rwmb_meta( $text_id, 'type=text', $post->ID ); $meta_key = "{$group_id}[{$text_id}]"; update_post_meta( $post->ID, $meta_key, $text ); // delete_post_meta( $post->ID, $text_id ); // Remove old data, use with care }Anh Tran
KeymasterI think I understand now, but it's still better to have screenshots ๐
Anh Tran
KeymasterHi, you can use
postfield with'post_type' => 'page'.Anh Tran
KeymasterHi Flickweert,
I'm not very clear about the bug. Do you mean that when adding
max_clone, it still allows you to add infinite number of clones? And when you remove a clone, the "Add more" button disappear?Anh Tran
KeymasterHi Flikweert,
I understand your concern, but there's no way to handle image upload in the group for now.
But you can use another way to achieve that by using
file_inputfield. It works similar to all image fields (can Browse or Upload images), but doesn't have preview. It's not 100% perfect for your needs, but it works for now.Anh Tran
KeymasterFYI, the latest version of Meta Box Show Hide now supports check for
is_child. Please try it out!Anh Tran
KeymasterHi, there's a way to change the returned value of
rwmb_metawhich can be useful for your case.The filter is
rwmb_metaalso and we can do like this:add_filter( 'rwmb_meta', 'prefix_meta', 10, 4 ); function prefix_meta( $meta, $key, $args, $post_id ) { if ( ! is_search() ) return $meta; // If this is search page, do whatever you want with the returned value $meta $meta = ''; return $meta; }Anh Tran
KeymasterFYI, the Conditional Logic has just been released. Please redownload the Core Extensions Bundle to get it.
If you have any problem using the new extension, please let us know in the support forum.
Thanks and enjoy!
Anh Tran
KeymasterThanks for your replies. Let me check it.
Anh Tran
KeymasterHi daveheslop,
This plugin is under development and will be available soon. When it's available, it will be included in the Core Extensions Bundle and you can download it from your account page.
Anh Tran
KeymasterYes, of course. You can use the following code to output the full URL of an image:
$image = rwmb_meta( 'field_id', 'type=image' ); echo $image['full_url'];For more information, please read this documentation.
Anh Tran
KeymasterHi again,
FYI, this feature has just been added to the latest version 4.5.4. Please update the plugin to use it.
Thanks for your idea and enjoy the plugin!
Anh Tran
KeymasterFYI, this feature is now available in version 4.5.4. Please update the plugin to use it.
Enjoy!
-
AuthorPosts