Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,986 through 3,000 (of 3,707 total)
  • Author
    Posts
  • 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;
    		}
    	}
    }
    in reply to: Feature request : admin list filters (taxonomies...) #4363
    Anh TranAnh Tran
    Keymaster

    Awesome features and links. I will make a note.

    in reply to: โœ…How to add icons to checkboxes? #4362
    Anh TranAnh Tran
    Keymaster

    That also works :). Remember to strip_tags on the frontend when you retrieve the meta value ๐Ÿ™‚

    in reply to: โœ…Character Limit on Textarea #4352
    Anh TranAnh Tran
    Keymaster

    I can't access that page. It's your internal admin page. So, the problem is how that page exports/imports content. I think it doesn't relates to Meta Box. Please try deactivate the text limiter extension and try again.

    in reply to: โœ…Extensions licenses must be renewed every year? #4351
    Anh TranAnh Tran
    Keymaster

    Yes, that's right. Each purchase lets you get support and updates for 1 year. Please read more in the FAQ.

    in reply to: โœ…How to add icons to checkboxes? #4350
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think the only way to do that is using custom CSS, something like this:

    input[type="checkbox"][value="xxx"] {
        background: url(image.jpg);
    }

    By default, the plugin outputs the checkbox only and CSS is the only way I think can resolve this.

    Edit: Sorry, I was thinking about normal checkbox fields built without the Builder. I think the Builder don't have such feature.

    in reply to: Select Box - Taxonomy use slug as value? #4344
    Anh TranAnh Tran
    Keymaster

    Just curious, why do you need to store slug instead of ID?

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

    Hi,

    You can run the following code:

    $option = get_option( 'option_name' );
    $option[$field_id] = $new_value;
    update_option( 'option_name', $option );
    in reply to: Problems with update from 4.8.7 to 4.9.6 #4342
    Anh TranAnh Tran
    Keymaster

    Hmm, it might relates with the way you register meta boxes. In 4.9.x, the biggest change is the WPML compatibility, which **forces** Meta Box to use init action to register meta boxes instead of previous admin_init.

    So, if you wrap your code like this:

    add_action( 'init', 'your_function' );
    function your_function() {
        add_filter( 'rwmb_meta_boxes', 'slug_register_meta_boxes' );
    }

    where init or any other hook is used, please change it to:

    add_filter( 'rwmb_meta_boxes', 'slug_register_meta_boxes' );

    I'm not sure if that's the correct problem, but some people meet it, so I guess you do. Please check your code for that.

    in reply to: โœ…Character Limit on Textarea #4341
    Anh TranAnh Tran
    Keymaster

    Hi, the plugin doesn't restrict on the content length displayed in the front end. It might be your PHP function that gets the content and displays it. Please check this.

    in reply to: Assign Custom Post type to Custom Taxonomy #4336
    Anh TranAnh Tran
    Keymaster

    I've just released the new version 1.2.5 for this. Please update the extension.

    Sorry for the delay.

Viewing 15 posts - 2,986 through 3,000 (of 3,707 total)