Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Han,
Unfortunately, we don't have that functionality yet.
March 20, 2020 at 3:50 PM in reply to: ✅Importing data from other than WordPress sources - relationships #18601Anh Tran
KeymasterHi Donald,
You might want to take a look at the data structure of
mb_relationshipstable, which is quite simple and easy to understand. It has 5 columns:ID: connection ID (auto increment)from: the ID of the "from" objectto: the ID of the "to" objecttype: the connection type (ID)order_from: the order for the "from" sideorder_to: the order for the "to" side
And based on that, you can prepare the data accordingly.
When inserting into the database manually, you can omit the
order_fromandorder_tofor simplicity.March 20, 2020 at 3:38 PM in reply to: ✅wpautop on custom Gutenberg blocks, can't remove wpautop? #18600Anh Tran
KeymasterHi Mauro,
I tried your code and didn't see any problem with wpautop. Please see my video:
https://www.loom.com/share/22373c8a9cf74fc18bbd401ca2b56ff0
Maybe I'm missing something.
March 20, 2020 at 3:04 PM in reply to: ✅Trouble getting file url of file attachment in cloneable group #18599Anh Tran
KeymasterHi,
The function you use
get_attached_fileis not correct. It returns the file path instead of array, see the docs.To get the file URL, you can use
wp_get_attachment_urlfile.if ( isset( $file_attachment['attachment'] ) ) { $file_url = wp_get_attachment_url( $file_attachment['attachment'] ); echo '<a href="' . $file_url . '" target="_blank">' . $file_name . '</a>'; }Anh Tran
KeymasterCan you post the code on pastebin.com? The forum auto strips all unwanted characters.
Anh Tran
KeymasterCan you please post the code of your meta box?
March 18, 2020 at 3:59 PM in reply to: ✅Field connector not working with Simple Image field when inserting into html #18575Anh Tran
KeymasterHi,
The BB shortcode for image fields will render full image tag and I think it's not possible to used within HTML module.
In that case, you can use our shortcode
rwmb_meta, like this:<img src="[rwmb_meta id='field_id' size='full' attribute='url']">The shortcode allows you to get a specific attribute of the returned value (which is an array).
PS: Please use the latest version of Meta Box on Github. There was a bug in getting URL of single image, that I've just fixed.
Anh Tran
KeymasterHi,
You can get the post ID with the following code:
$post_id = null; if ( isset( $_GET['post'] ) ) { $post_id = intval( $_GET['post'] ); } elseif ( isset( $_POST['post_ID'] ) ) { $post_id = intval( $_POST['post_ID'] ); }Anh Tran
KeymasterHi,
The dashboard shortcode has an attribute to specify the edit page. And it will get the post type from the edit page, and then show all posts belong to that post type.
If you want to set a specific post type, please edit the shortcode in the edit page and set the post type explicitly there. By default, it's "post".
Anh Tran
KeymasterHi Ryan,
Are you using the Frontend Submission extension? In that extension, we hide all default post fields in the admin area, to make them not duplicated with the default WP UI.
Anh Tran
KeymasterHi Mark,
For
taxonomy_advancedfield, it works similar to any other field.You can use
containsorincondition and both works. Remember to use term ID to specify the value.So, you can write the condition like this:
'visible' => ['field_id', 'contains', 4], // 4 is the term IDOr:
'visible' => ['field_id', 'in', [4, 2]], // 4, 2 are term IDs. In this case, the field will be visible if the tax_advanced has any term with the ID specified.Please see this video for demo:
Anh Tran
KeymasterHi Pogeun,
I guess the problem comes from the front-end CSS, where your theme style might affect WP's style for the media library.
The easiest way to fix it I can think of is using CSS to hide these strings. Please try it.
March 18, 2020 at 2:35 PM in reply to: ✅Trouble getting file url of file attachment in cloneable group #18568Anh Tran
KeymasterHi, you need to check if the file is uploaded in your group, like this:
if ( isset( $file_attachment['attachment'] ) ) { $file_info = get_attached_file( $file_attachment[‘attachment’] ); echo ... }Anh Tran
KeymasterHi Daniel, we haven't supported saving the whole posts object in custom table yet. That's on our plan and we'll try to finish it this year. We'll let you know when it's done.
March 11, 2020 at 10:08 AM in reply to: ✅Bug: Frontend form submit button stuck as disabled when validation fails #18526Anh Tran
KeymasterHi Ryan,
Thanks a lot for your feedback. I've just fixed it and released version 1.6.3.
-
AuthorPosts