Forum Replies Created
-
AuthorPosts
-
Tan Nguyen
ParticipantGot it, my suggestion syntax is for exactly match when post category should be product and cannot belongs to another one. If you want to show your meta box when post categories is in
productand others. You can useinoperator:'visible' => ['slug:post_category', 'in', ['product']],Best regards,
Tan
Tan Nguyen
ParticipantGlad that you've fixed it. Awesome!
Tan Nguyen
ParticipantDear Yumiko,
Thanks for reporting, I'll try to replicate the problem on my PC then give you an answer and update. It's hard to replicate the problem, it's better if you can give me your server logs file. Currently, you can try: deactivating other plugins (security plugins first if exists), and activate other themes.
Best regards,
Tan
Tan Nguyen
ParticipantHi bro,
Because you've purchased Developer Bundle. You can use MB Conditional Logic instead. It has more features for you:
Instead of:
'show' => ['category' => ['Product']]You can use:
'visible' => ['slug:post_category', 'product']Documentation can be found here:
https://metabox.io/docs/meta-box-conditional-logic/Best regards,
Tan
Tan Nguyen
ParticipantCurrently, you can use export in bottom dropdown, the top dropdown doesn't works and we'll fix this on the next release ๐
Tan Nguyen
ParticipantDear Flikweert,
I've fixed this bug, please grab the latest version (1.3.2). Cheers!
Tan Nguyen
ParticipantThanks Flikweert, I'll check it and answer this weekend ๐
Tan Nguyen
ParticipantDear wefit,
I've fixed Sub Sub Sub field doesn't works. Please grab the latest version (1.3.1)
Tan Nguyen
ParticipantDear Gerda,
I've fixed it, please get the latest version (1.3.1)
Tan Nguyen
ParticipantI've created 2 plugins named Plugin 1 and Plugin 2, and it works:
<?php /* Plugin Name: Plugin 1 Plugin URI: https://giga.ai Description: Test Plugin 1 Version: 0.1 Author: Tan Nguyen Author URI: https://giga.ai License: GPL2+ */ if( ! class_exists( 'MB_Conditional_Logic' ) ) include plugin_dir_path( __FILE__ ) . 'meta-box-conditional-logic/meta-box-conditional-logic.php';Can you please check if another locations has included this plugin? Or please check your hosting environment.
Cheers!
Tan Nguyen
ParticipantThanks Cole, I've pushed a new release ๐
Tan Nguyen
ParticipantI see, with your case, I'd recommended:
- A select field: Github, Gitlab, Bitbucket.
- (Optional): Three labels: Github Username, Gitlab Username, Bitbucket Username, visible when select field equal to label.
- A Text field: Username
So your
wp_postmetatable will cleaner because it only save 2 fields instead of 4, and the validation will works.Cheers!
Tan Nguyen
ParticipantDear weseo,
Thanks for using our plugins. As your field is required, it shouldn't be hidden and vice versa, this will breaks our scripts functionality. So you can change your require validation logic if it's possible.
Best regards
Tan
Tan Nguyen
ParticipantDear nicolas,
I've tested with my site and it works. This is my meta box:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'brand_product', 'title' => 'Brands and Products', 'post_types' => array( 'post', 'page' ), 'context' => 'normal', 'priority' => 'high', // Conditional Logic can be applied to Meta Box // In this example: Show this Meta Box by default. Hide it when post format is aside 'hidden' => array( 'post_format', 'aside' ), 'fields' => array( array( 'id' => 'brand', 'name' => 'Brand', 'desc' => 'Pick Your Favourite Brand', 'type' => 'select', 'options' => array( 'Apple' => 'Apple', 'Google' => 'Google', 'Microsoft' => 'Microsoft' ) ), array( 'id' => 'apple_products', 'name' => 'Which Apple product that you love?', 'type' => 'radio', 'options' => array( 'iPhone' => 'iPhone', 'iPad' => 'iPad', 'Macbook' => 'Macbook', 'iWatch' => 'iWatch' ), // Conditional Logic can applied to fields // In this example: Show this field by default, // hide it when user selected different value than 'Apple' on brand select field 'hidden' => array( 'brand', '!=', 'Apple' ) ), array( 'name' => 'Price', 'id' => "tan_price", 'desc' => 'Input price without currency', 'type' => 'text', 'clone' => false, 'size' => 25, 'tab' => 'dish', // 'visible' => array( "{$prefix}menu_item_type", '!=', '0' ), 'hidden' => array( 'when' => array( array( "brand", 'not in', array( 'Google', 'Microsoft' ) ), array( "post_category", 1 ), ), 'relation' => 'or' ), ), ) ); return $meta_boxes; } );It hidden when either
brandis Apple orpost_categoryis 1.If this problem still persist, can you please send me your website credentials and FTP info via contact form so I can login your website to check?
Best regards,
Tan
Tan Nguyen
ParticipantYeah, I'll add it to future update as it's nice feature. Thanks for your question ๐
-
AuthorPosts