Forum Replies Created
-
AuthorPosts
-
November 20, 2015 at 11:12 PM in reply to: if ( ! empty ) returning blank fields rather than else content #1789
Anh Tran
KeymasterWhich version of the Meta Box and Group are you using? There were some problems of the plugin and group which made them didn't save the value correctly. Can you please update to the latest version and see if it's resolved?
If it's not, can you please post the code you setup the fields? Thanks.
Anh Tran
KeymasterHi, can you please post your code?
Anh Tran
KeymasterHi,
This is just fixed. I will update the plugin today.
Anh Tran
KeymasterThe new version 4.7.1 fixes this bug. Please update.
November 19, 2015 at 4:34 PM in reply to: Text Fields dont save (MB Group 1.0.2) (Meta Box 4.7) #1768Anh Tran
KeymasterThat was my mistake :(. I forgot to update the data on the server. Everything seems fine now.
Thanks!
November 19, 2015 at 11:24 AM in reply to: Text Fields dont save (MB Group 1.0.2) (Meta Box 4.7) #1765Anh Tran
KeymasterDue to a change in Meta Box 4.7 with "attributes" param, the old code for Group doesn't work. I've just updated the extension to make it work with new version of Meta Box. Please update.
Thanks for reporting.
Anh Tran
KeymasterHi, sorry for this stupid bug :(. There's a fix for it on github and I will update the plugin right now.
Anh Tran
KeymasterGlad that you made it ๐
Anh Tran
KeymasterYes! We've built an extension for term meta a month ago. While it was in the testing phase, we just received the news about term meta will be supported by WP in 4.4, so we have to change the code base to make it work with the new API. This extension will be released soon ๐
Anh Tran
KeymasterThe
rwmb_metareturns the value for current post. So the code above works only if you're viewing the attachment page. To make sure it works, you can provide the attachment ID as the 3rd param:rwmb_meta( 'sw_link', 'type=url', $attachment_id );Anh Tran
KeymasterCan you please send me the admin account to check (via the contact page). If it's a bug from the plugin that we can't resolve fast, we will refund you.
Thanks.
Anh Tran
KeymasterHi,
The
file_inputfield store the URL of the image in the post meta, so if you userwmb_meta()function, you will get the URL of the file.In case you want to use more sizes of the file, WordPress has a helper function to retrieve attachment ID from the URL
attachment_url_to_postid(). The sample code looks like this:$speakergroup = rwmb_meta( 'cf_speakers' ); foreach ( $speakergroup as $speakerdata ) { $attachment_id = attachment_url_to_postid( $speakerdata['cf_speakerpic'] ); list( $src ) = wp_get_attachment_image_src( $attachment_id, 'thumbnail' ); echo '<a href="' . $speakerdata['cf_speakerurl'] . '" target=_blank><img src="' . $src . '" class="circle wp-post-image"></a>'; }November 13, 2015 at 10:23 AM in reply to: Is it possible to combine two meta items and concatenate them into a third? #1729Anh Tran
KeymasterGreat that you have resolved this ๐
Anh Tran
KeymasterDid you put it in the post content? The shortcode shows value only if you put it in the post content (or where it's rendered).
If you put it in another place like theme's files, you should use:
<?php echo '[rwmb_meta meta_key="image3"][/rwmb_meta]'; ?>Anh Tran
KeymasterCan you please post your code?
-
AuthorPosts