Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterI got it. The problem is the total columns in the last row does not equal to 12. The last row has a hidden field, which has number of columns 2. Changing it to 12 fixes the bug.
I have updated files via FTP, please take a look.
Anh Tran
KeymasterHi,
Currently, it works for single sites in the Multisite. You can use it to add settings/options for a single site, not for the whole network.
Anh Tran
KeymasterHi again,
Just looked into the code and tested with fields which don't need
idattributes:heading,divider,custom_htmland onlycustom_htmlusesstdto output the HTML content of the field. These fields don't use meta value for anything, thus, theget_post_metafunction is not used.I don't think there's a bug here, or am I misunderstanding you? Can you give more details on what you're trying to do?
Anh Tran
KeymasterThat's it! The Group extension is outdated. Please update to the latest version :). The latest version has fix for this bug.
Anh Tran
KeymasterHmm, can you please post full error message? I need that to see where the error comes from.
Anh Tran
KeymasterCan you post your code? I guess the total of columns on some rows does not equal to 12, can you please check that (especially the last row)?
Anh Tran
KeymasterDid you see any error in the console when deleting the clone?
Anh Tran
KeymasterAre you using a theme that has Meta Box plugin included directly?
Anh Tran
KeymasterHi again,
Just wonder why don't you use
plupload_imagefield? It has nice UI and allows you to select files from your computer. I forgot about this ๐Anh Tran
KeymasterThanks, I will look at this issue.
Anh Tran
KeymasterHi, I already fixed that in the development version. It will be included in the next version.
Anh Tran
KeymasterHi,
This is a hard question :). I think the filter allows you to change the value of whole group, as the group is the actual field you're filtering. So,
$oldand$neware arrays (of sub-field values). I guess you're using a cloneable group? If so, then$oldand$neware arrays (of clones), each clone is an array of sub-fields.Let's try with the code below:
add_filter('rwmb_GROUP_ID_value', 'prefix_change_value',10,3); function prefix_change_value ( $new, $field, $old ) { $text_field_id = 'SUB_FIELD_ID'; foreach ( $new as $k => $clone ) { $new[$k][$text_field_id] = uniqid(); } return $new; }Anh Tran
KeymasterHi, I see you included the Group extension inside your theme. The extension is the latest version (it has the method
is_saved()) but the Meta Box installed on your website is not (the version 4.7.3 has methodis_saved()). So, to fix this issue, please:- Deactivate the theme first (if the error prevents you from accessing the Dashboard, try changing the theme folder name)
- Update Meta Box to the latest version
- Reactivate the themeAnh Tran
KeymasterGlad to see you figured it out. To echo nothing if the field is empty, you just need to change the code a little bit:
<?php $field_id = 'twitter-url'; if ( !empty( $settings[$field_id] ) ) { echo '<li><a href=" ' . $settings[$field_id] . '"><i class="fa fa-twitter"></i></a></li>'; } ?>Anh Tran
KeymasterHi, where do you put the code above into your theme? Maybe you should not
returnthe result as you will use it in another way (display it or use as a variable). Usingreturnin a PHP file will stop execution of the following code. -
AuthorPosts