Forum Replies Created
-
AuthorPosts
-
November 30, 2018 at 4:31 PM in reply to: ✅metabox removes multiple text field with html links inside #12386November 29, 2018 at 5:44 PM in reply to: ✅metabox removes multiple text field with html links inside #12358
Anh Tran
KeymasterHi Gunvor, I've just tried your code and seen the problem. I'll fix it soon.
Anh Tran
KeymasterHi Neil,
The
telinput still allows to enter text. In order to force a format, please add another custom attribute with namepatternand value like[0-9]{3}-[0-9]{3}-[0-9]{4}(123-456-7890). Then the plugin will use that pattern as a validator for data entered.Please note that the value is a regular expression, where
[0-9]means only numbers,{3}means only 3 times. For more info, please read this guide.Anh Tran
KeymasterHello, it's not possible yet. We're working on the date formats for Meta Box. When it's done, it will be shipped to the Admin Columns.
Anh Tran
KeymasterHi Neil,
#1. I'm afraid there's no pagination supported at the moment. But I think you can use the MB Tabs to organize the fields into tabs, so not many fields are displayed to users at once.
#2. Yes, that's doable. Firstly, you need to create an archive page for your packages. It's like a custom post type archive in WordPress, so no big deal.
Secondly, create a "Edit" page, where you insert the shortcode
[mb_frontend_form]to edit a package.Finally, add a link to the "Edit" page in packages. To make the "Edit" page understands the package, you can pass the
post_idto its URL. So, I'd like to use a filter to auto insert the link to package's post content, like this:add_filter( 'the_content', function( $content ) { if ( ! is_singular( 'package' ) ) { return $content; } $edit_page = 123; // ID to "Edit" page $edit_page_link = get_permalink( $edit_page ); $edit_link = add_query_arg( 'rwmb_frontend_field_post_id', get_the_ID(), $edit_page_link ); $content .= "<p><a href='$edit_link'>Edit package</a></p>"; } );Anh Tran
KeymasterHi Nakaiya,
Yes, of course. But in the callback function of the
rwmb_meta_boxesfilter, please just use the variable$meta_boxes. It's an array of meta boxes. Each meta box has a different title.So, your code can be modified to this:
add_filter( 'rwmb_meta_boxes', 'announcements_register_meta_boxes' ); function announcements_register_meta_boxes( $meta_boxes ) { $prefix = 'announcements_'; $meta_boxes[] = array( 'id' => 'announcements', 'title' => 'Announcements Meta', 'post_types' => 'announcements', 'fields' => array( // DATE array( 'name' => __( 'Event Date - If nothing is entered here, the post publish date will be used', 'announcements_' ), 'id' => "{$prefix}display_date", 'type' => 'date', ), ) ); return $meta_boxes; } add_filter( 'rwmb_meta_boxes', 'register_meta_boxes' ); function register_meta_boxes( $meta_boxes ) { $prefix = 'uu_'; $meta_boxes[] = array( 'id' => 'uu_metabox', 'title' => 'My Metabox', 'post_types' => 'post', 'fields' => array( // DATE array( 'name' => __( 'Event Date - If nothing is entered here, the post publish date will be used', 'announcements_' ), 'id' => "{$prefix}display_date", 'type' => 'date', ), ) ); return $meta_boxes; }November 29, 2018 at 1:50 PM in reply to: ✅Show Hide Extension Needs Update as WordPress 5.0 Beta is Available. #12348Anh Tran
KeymasterHi Saqib,
I've just updated the extension to make it works with Gutenberg. However, there's some limitation in Gutenberg, it only supports the
templateandpost_formatrules. Other rules are still not supported and need to wait for update from Gutenberg. I'll update the extension when it's done.Anh Tran
KeymasterCan you try re-save the meta box?
Anh Tran
KeymasterI forgot to change the version number on the website. Please try again.
Anh Tran
KeymasterAh, you're using the MB Builder :). I was saying about using code.
In MB Builder, to change the type, please go to Advanced tab, try add a custom attribute
typewith valuetel.Anh Tran
KeymasterIt's now available in the AIO. Please update!
Anh Tran
KeymasterJust fixed this issue in the Builder, please update.
November 27, 2018 at 2:22 PM in reply to: Is it possible to use Select2 in select_tree field type? #12290Anh Tran
KeymasterHi Jefferson,
Thanks for the suggestion. I'll put it on my note and will try to implement this.
Anh Tran
KeymasterHi Jefferson,
Unfortunately, no. The whole "tree" is considered as a field, and it's to be put in a single column.
Anh Tran
KeymasterHi Jefferson,
I haven't integrated with Algolia. From what I've just read on its docs is you need to add objects to their database to make them index. They already have PHP library, so I think the process would be:
- get the value from custom table,
- use the library to add this value to their database.
-
AuthorPosts