Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi kesit, we're updating the Group extension to fix that problem. Please wait a little bit.
Anh Tran
KeymasterHi Neil,
This snippet creates a shortcode to include the screenshot of a site. It works anywhere, with any plugin. What do you want to do with that?
Anh Tran
KeymasterHi,
Unfortunately, it's not available. Because it's kind of impossible to know when to increase the field value: when a page is edited or when a new post is created (and so on).
Anh Tran
KeymasterHi Aqib,
It's not available on .org yet. I need to improve it a little bit. At the moment, it's very basic.
December 8, 2018 at 10:55 PM in reply to: ✅Function to retrieve all post data from custom table #12557Anh Tran
KeymasterHi Jefferson,
To get all fields from custom table, you can do a simple query:
global $wpdb; $fields = $wpdb->get_row( "SELECT * FROM your_table WHERE ID={$post_id}" ); echo $fields->your_field;If you use the helper function to get a field value, it will create a very similar query and cache the result. So the next call to get another field's value, it won't create any extra DB query.
Anh Tran
KeymasterYes, that's the correct flow. It's useful whenever you want to do advanced things with code.
Anh Tran
KeymasterHi Pete,
The MB Builder doesn't allow you to use dynamic values from other fields at the moment. You need to create the meta box and field by code.
Here is an example:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $post_id = null; if ( isset( $_GET['post'] ) ) { $post_id = intval( $_GET['post'] ); } elseif ( isset( $_POST['post_ID'] ) ) { $post_id = intval( $_POST['post_ID'] ); } $options = array( 'w' => get_post_meta( $post_id, 'w', true ), 'ru' => get_post_meta( $post_id, 'ru', true ), // and so on. ); $meta_boxes[] = [ 'title' => 'Your title', 'fields' => [ [ 'type' => 'select', 'id' => 's', 'name' => 'Select', 'options' => $options, ], ], ]; } );December 6, 2018 at 2:38 PM in reply to: Display meta data from one post on connected posts edit pages #12519Anh Tran
KeymasterHi Tamer,
If all you want is just displaying customer info on the invoice edit page, then you can use a custom field
custom_htmlto get their data and show. These data should be for customers, they are custom fields for customers. On the invoice edit page, you simply make a query and get the info.December 6, 2018 at 2:34 PM in reply to: ✅404 Error on Edit Post Screen when Meta Box Assigned to CPT #12518Anh Tran
KeymasterHi Pete,
Glad that you have resolved it. Please let us know if you need anything else.
Anh Tran
KeymasterHi,
Select tree is exactly what you need.
December 6, 2018 at 9:53 AM in reply to: ✅Wrong action name being used in User Profile extension #12515Anh Tran
KeymasterHi Joe,
I've just invited you to join our team on Bitbucket, where we host all our extensions. Feel free to contribute code. We really appreciate your help!
Anh Tran
KeymasterHey guys,
Sorry for long time. We've just updated Conditional Logic to 1.6.4, which now supports Gutenberg. It works for
post_formatandpage_templateand all rules internal for meta boxes / fields (such as show / hide a field based on another field). For some rules like checking by categories or custom taxonomies, there's a limitation from Gutenberg that can't be done at the moment. We'll work with Gutenberg team to find a solution and will update the plugin as soon as we can.December 5, 2018 at 12:06 PM in reply to: ✅I need to know what Data Type I can use in MB Custom Table #12488Anh Tran
KeymasterHi Jefferson, the data types are MySQL types and listed here.
I see the field
direct_salethat you used has typeTINYINT(1), so I guess it's used for checkbox field, which has value1or0.I've just checked the custom table extension and found a bug for displaying empty value (including
0). I'll fix it now.Anh Tran
KeymasterHi Neil,
We have resolved the problem of storing custom fields 🙂 Only the layout issue left.
Regarding the 3rd party form, I have experience with Gravity Forms the most, and it works really well for all the situations I had in the past. So it's my obvious recommendation. WPForms and Ninja Forms are also popular, but I don't like their UI in the back end. Ninja Forms used to have a nice UI that blended well with WordPress, but it changed :(.
-
AuthorPosts