Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 250 total)
  • Author
    Posts
  • in reply to: Hide a metabox when a parent is selected #1194
    Tan NguyenTan Nguyen
    Participant

    Hi Sinusite,

    Thanks for purchasing Conditional Logic and reporting documentation missing, you rock man ๐Ÿ™‚

    For postexcerpt or taxonomy_div, you can add filter to rwmb_outside_conditions like so:

    
    add_filter( 'rwmb_outside_conditions', function( $conditions )
    {
        $conditions['postexcerpt'] = array(
            'hidden' => array(
            	'relation' => 'and',
            	'when' => array( array('post_format', '=', 'aside') )
            ) 
        );
        return $conditions;
    } );
    

    P/S: The conditional logic array should be simplified like example below but it's a bug on our extension and you'll get the update on the next 24 hour:

    
     $conditions['postexcerpt'] = array(
            'hidden' => array('post_format', 'aside' )
     );
    

    Thanks and Best regards

    Tan Nguyen

    in reply to: Metabox hidden using the same id #1184
    Tan NguyenTan Nguyen
    Participant

    Hi man,

    Thanks again for sharing your idea.

    Basically, Conditional Logic is the extension to show or hide meta box fields or whole meta box. Each field or meta box id is unique, so we cannot registered two fields or meta boxes at a same time.

    That feature which you've requested is to change the field options (or values) when the conditional is meet, currently, we don't support it but as a great idea, we'll try to implement this feature on the next major update, about late August.

    Best regards

    Tan Nguyen

    Tan NguyenTan Nguyen
    Participant

    Hi ccatalina,

    Please update to the latest version, it has some improvements and fixed that bug.

    Best regards

    Tan Nguyen

    in reply to: MB Builder & MB Include Exclude #1137
    Tan NguyenTan Nguyen
    Participant

    Hi alsk

    Sorry for late reply, I've double check our plugin and it's supports page template. Can you please check your theme if template exists?

    Best Regards

    Tan Nguyen

    in reply to: MB Builder & MB Include Exclude #1133
    Tan NguyenTan Nguyen
    Participant

    Hi alsk,

    Thanks for using MB Builder, I'm adding this feature and you'll get update within next 24 hours.

    Best Regards

    Tan Nguyen

    in reply to: Metabox hidden using the same id #1088
    Tan NguyenTan Nguyen
    Participant

    Hi catarinacarraro,

    Thanks for your question, unfortunately, we're currently not support that feature yet. We'll mention it to think a way to improve our Conditional Logic.

    Thanks and Best Regards.

    Tan Nguyen

    in reply to: STD in metabox RADIO #1076
    Tan NguyenTan Nguyen
    Participant

    Can you please send me your meta box code? So I can fix it for you.

    in reply to: Metabox hidden using the same id #1075
    Tan NguyenTan Nguyen
    Participant

    Hi catarinaarraro,

    As your logic, this is my snippet, you can edit to fit to your project:

    
    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',
    		'fields' => array(
    			array(
    				'id'	=> 'fone_id',
    				'name'	=> 'Brand',
    				'desc'	=> 'Pick Your Favourite Brand',
    				'type'	=> 'select',
    				'options' => array(
    					'apple' 		=> 'Apple',
    					'android' 		=> 'Android',
    					'windowsphone' 	=> 'WindowsPhone'
    				)
    			),
    			array(
    				'id' 	=> 'apple_products',
    				'name'	=> 'Select your apple product?',
    				'type'	=> 'checkbox_list',
    				'options' => array('iPhone', 'iPad', 'iPod'),
    				'visible' => array( 'fone_id', '=', 'apple' )
    			),
    			array(
    				'id' 	=> 'android_products',
    				'name'	=> 'Select your android product?',
    				'type'	=> 'checkbox_list',
    				'options' => array('Galaxy', 'ZenPhone', 'Tablet'),
    				'visible' => array( 'fone_id', '=', 'android' )
    			),
    			array(
    				'id' 	=> 'windowsphone_products',
    				'name'	=> 'Select your apple product?',
    				'type'	=> 'checkbox_list',
    				'options' => array( 'Nokia', 'Galaxy' ),
    				'visible' => array( 'fone_id', '=', 'windowsphone' )
    			)
    		)
    	);
    
    	return $meta_boxes;
    } );
    

    Best regards

    Tan Nguyen

    in reply to: Installation error on line 133 #1036
    Tan NguyenTan Nguyen
    Participant

    Hi catarinacarraro,

    Thanks for purchasing and using MB Conditional Logic.

    Sorry, this problem because Conditional Logic isn't compatibility with your PHP version, this is our bug and we'll have an update on the next day and you'll get the update shortly.

    To fix it now, you can simply replace
    ['and', 'or']

    with
    array('and', 'or')

    Then that line with become:

    
    $relation = ( isset( $condition['relation'] ) && in_array( $condition['relation'], array('and', 'or') ) ) ? $condition['relation'] : 'and';
    

    Thank you and best regards.

    Tan Nguyen

    in reply to: Include plugin on theme #1032
    Tan NguyenTan Nguyen
    Participant

    Hi Alona,

    Thanks for using our plugins.

    We wouldn't recommend you include plugin in theme, the reason is same as Include Meta Box Plugin In Themes/Plugins, you can use TGM Activation Class to tell users that your theme is required that plugin.

    But incase you really need to include plugin into your theme, here is the solution. Looks like you've already purchased MB Conditional Logic, so I'll use this plugin and twentyfifteen theme for example:

    1. Copy whole plugin directory to your theme, for example twentyfiteen/inc
    2. Open your functions.php, add this snippet to the last:

    
    if ( is_admin() )
    {
    	define( 'MBC_URL', get_template_directory_uri() . '/inc/meta-box-conditional-logic/' );
    	define( 'MBC_DIR', get_template_directory() . '/inc/meta-box-conditional-logic/' );
    
    	require MBC_DIR . '/meta-box-conditional-logic.php';
    }
    

    Or you can change inc directory to whatever you want.

    Best regards

    Tan Nguyen.

    in reply to: Meta box visible on certain page? #1029
    Tan NguyenTan Nguyen
    Participant

    You're welcome, and please don't hesitate to tell us if you have problem.

    in reply to: show hide question #1027
    Tan NguyenTan Nguyen
    Participant

    Hi umtang41,

    Just want to notify you. Did you used Conditional Logic? Does it solved your problem? And please don't hesitate to tell us if you have problem or confusing when using it ๐Ÿ™‚

    Regards

    Tan Nguyen.

    in reply to: Meta box visible on certain page? #1026
    Tan NguyenTan Nguyen
    Participant

    Hi Cristian,

    Thanks for using MB Conditional Logic.

    Conditional Logic can works with any DOM element, so you can set the visibility for meta box if page is child or parent. This is some usage example:

    Visible when the page is parent (root)

    
    'visible' => array('parent_id', '')
    

    Visible when the page is child

    
    'visible' => array('parent_id', '!=', '')
    

    Visible when the page's parent ID is 99

    
    'visible' => array('parent_id', 99)
    

    Visible in certain page (ID > 101 for example):

    
    'visible' => array('post_ID', '>', 101)
    

    These examples above uses visible action, you can use hidden action in case you want to hide it.

    Regards.

    in reply to: Disable rwmb_meta() on Search Results #1007
    Tan NguyenTan Nguyen
    Participant

    Hi Maxell,

    That fatal error happened when you assign a value to function. You cannot do that.

    For this problem, we'll need to change the logic before $smof_data has overridden by rwmb_meta. After that, we have no chance to do it. For example, we'll assign each $smof_data index with rwmb_meta key only if current page is not search page. You can post some lines on that file and I'll have a look at with you.

    Regards.

    in reply to: Disable rwmb_meta() on Search Results #994
    Tan NguyenTan Nguyen
    Participant

    Hi Maxell,

    Can you show me where did you put rwmb_meta function? If you wanna show meta box value on singular pages, like Post or Page, you can put rwmb_meta to single.php, page.php or singular.php (depend on your template hierarchy).

    In case both singular pages and archive pages in your theme are included same file. You can exclude rmmb_meta on search page like so:

    
    // Only execute rwmb_meta function when current page is not search page
    if ( ! is_search() )
       rwmb_meta('your_value');
    

    Regards

    Tan Nguyen

Viewing 15 posts - 226 through 240 (of 250 total)