Forum Replies Created
-
AuthorPosts
-
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?
November 11, 2015 at 10:26 AM in reply to: Similar ID not work in different meta boxes and page templates #1719Anh Tran
KeymasterHi Saquib,
The Show/Hide extension doesn't remove the input from the edit screen. It only toggles the input using CSS. That means both the inputs are there and that makes the browser users the latest value to send to PHP.
In this case, I suggest you use the Include/Exclude extension. This extension works similar to the Show/Hide, but it removes the input completely from the screen (if it's not included).
The other way is using different ID and then you can add a simple condition in the frontend to get the correct meta value.
Hope that helps.
November 11, 2015 at 10:19 AM in reply to: Unable to View Uploaded Image Without Changing Filter #1718Anh Tran
KeymasterHi Saquib,
Thanks for reporting this bug. This bug happens since version 4.6 due to the change in the JS code of the "image_advanced" field. It was reported in [Github](https://github.com/rilwis/meta-box/issues/678) and [here](https://support.metabox.io/topic/image-uploads-not-working/). We're working on this, please be patient.
Anh Tran
KeymasterHi kleis,
Currently it's not supported. We have a plan to develop this.
Anh Tran
KeymasterHi,
I've just updated the extension with the fix for this bug. Please update it.
Thanks.
November 9, 2015 at 9:24 AM in reply to: Is it possible to combine two meta items and concatenate them into a third? #1704Anh Tran
KeymasterHi,
Sorry for this late reply. I think it's possible if you want to combine 2 values only when querying the database using raw MySQL query. But if you want to combine them in another way or somehow (I'm not sure what you want exactly), then maybe you need to write a custom script to check and re-add a new meta value for each post.
Anh Tran
KeymasterThat's so great. Thank you very much!
Anh Tran
KeymasterI was trying to debug this and it seems fine. Here is the screenshot of "file" field, where the text is translated (I'm not sure if it's correct):
Maybe the problem comes from untranslated texts where you see them in English. Can you please check with "file" field?
In the case of untranslated texts, it would be great if you can contribute translation for the plugin at https://translate.wordpress.org/projects/wp-plugins/meta-box.
Anh Tran
KeymasterHi,
It looks like there is a bug with the condition 'AND', I will fix it and update asap.
Anh Tran
KeymasterHmm, in the version 4.6, I changed the way the plugin load translations (from translate.wordpress.org and fallback to local .mo files). In my test with Vietnamese, it was ok. Let me check it again.
-
AuthorPosts