Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,971 through 2,985 (of 3,702 total)
  • Author
    Posts
  • in reply to: Behavior of Datetime field #4440
    Anh TranAnh Tran
    Keymaster

    Hi, thanks for reporting the bug. Let's track this issue on Github for better communication with other users as well. It belongs to the core plugin.

    in reply to: Set Selected by default in Radio box #4431
    Anh TranAnh Tran
    Keymaster

    Just add 'std' => 'no' to the field ๐Ÿ˜‰

    in reply to: Color Field: Alpha channel possible? #4430
    Anh TranAnh Tran
    Keymaster

    We're using the WordPress built-in color picker (Iris) and sadly it doesn't have alpha channel ๐Ÿ™

    in reply to: Single Image field? #4429
    Anh TranAnh Tran
    Keymaster

    Currently you can do that with 'max_file_upload' => 1 for image_advanced field ๐Ÿ™‚

    in reply to: โœ…How to 'specify path to config file' in theme mode? #4417
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think there's a misunderstanding here. The extension provides UI for users to enter the config or specify the path to the config file (as instructed here). It doesn't work if you specify the path to the config file in your code.

    in reply to: Need help for Paging #4409
    Anh TranAnh Tran
    Keymaster

    How to you want your pagination to be?

    in reply to: Front-end display/input #4400
    Anh TranAnh Tran
    Keymaster

    Hi, currently, the plugin doesn't support showing the inputs in the frontend yet.

    in reply to: โœ…Using with Include_Exclude doesn't work #4390
    Anh TranAnh Tran
    Keymaster

    Yes, that would work, too. I'm refactoring the code to make it better ๐Ÿ™‚

    in reply to: โœ…Using with Include_Exclude doesn't work #4387
    Anh TranAnh Tran
    Keymaster

    I have a solution for that, but it requires both the core plugin and the extension to update. I'm thinking about backward compatibility.

    in reply to: Nested group php call #4378
    Anh TranAnh Tran
    Keymaster

    Ah, sorry, for image fields, the returned value is always an array. You need to change the code to:

    $object_imgs = isset( $sector['rw_sector-object-image'] ) ? $sector['rw_sector-object-image'] : array();
    if ( ! empty( $object_imgs ) ) {
        foreach ( $object_imgs as $object_img ) {
            echo '<div class="sector-object-img">
                <div class="slider slider-for">
                <img src="' . wp_get_attachment_image_url( $object_img, 'type=image_advanced&size=full&multiple=true' ) . '">
            </div>
            </div>';
        }
    }
    in reply to: Use of Limit Parameter #4377
    Anh TranAnh Tran
    Keymaster

    You can use this code:

    $metaBackgroundImage = rwmb_meta( 'socialityandydote_background_image' );
    $metaBackgroundImage = empty( $metaBackgroundImage ) ? '' : reset( $metaBackgroundImage );

    This takes the first image from the returned array. Then you can use it without the foreach loop.

    in reply to: Number field not showing std #4376
    Anh TranAnh Tran
    Keymaster

    Just tried your code and 48 shows up as default value for me. Please note that it works only for the posts where the meta box hasn't been saved. You can check it with new posts.

    in reply to: Help Update option value #4366
    Anh TranAnh Tran
    Keymaster

    This is resolved on Github: https://github.com/rilwis/meta-box/issues/1001.

    in reply to: Bug with the ids of the clonable fields. #4365
    Anh TranAnh Tran
    Keymaster

    Looks like the regex pattern matches the wrong position. I will take a look at that.

    Thanks for letting me know.

    in reply to: Nested group php call #4364
    Anh TranAnh Tran
    Keymaster

    No problem, here you are:

    <?php
    $prefix = '';
    $sectors = rwmb_meta( "{$prefix}sector" );
    if ( ! empty( $sectors ) ) {
    	foreach ( $sectors as $sector ) {
    		$sector_heading = isset( $sector["{$prefix}sector-heading"] ) ? $sector["{$prefix}sector-heading"] : '';
    		echo $sector_heading;
    
    		$sector_title = isset( $sector["{$prefix}sector-title"] ) ? $sector["{$prefix}sector-title"] : '';
    		echo $sector_title;
    
    		$objects = isset( $sector["{$prefix}sector-object"] ) ? $sector["{$prefix}sector-object"] : array();
    		foreach ( $objects as $object ) {
    			$object_img = isset( $object["{$prefix}sector-object-img"] ) ? $object["{$prefix}sector-object-img"] : '';
    			if ( $object_img ) {
    				echo '<img src="' . wp_get_attachment_image_url( $object_img, 'size' ) . '">';
    			}
    			$object_desc = isset( $object["{$prefix}sector-object-description"] ) ? $object["{$prefix}sector-object-description"] : '';
    			echo $object_desc;
    		}
    	}
    }
Viewing 15 posts - 2,971 through 2,985 (of 3,702 total)