Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,601 through 3,615 (of 3,958 total)
  • Author
    Posts
  • in reply to: is_child not working as expected #2195
    Anh TranAnh Tran
    Keymaster

    Ah, I see. Probably a bug with the Show/Hide extension. I will fix it to support "live" change.

    in reply to: Bought all extensions do I still add MB to functions? #2193
    Anh TranAnh Tran
    Keymaster

    Hi,

    That's not 100% true.

    As you already bought all extensions, you have the MB Builder extension which allows you to create meta boxes and custom fields with UI. You don't need to code if you use it.

    You also don't need to code if you use free extensions: MB Custom Post Type or MB Custom Taxonomy.

    Other extensions require you to add custom code to your themes/plugins. Please follow the documentation of each extension for more details.

    in reply to: is_child not working as expected #2192
    Anh TranAnh Tran
    Keymaster

    I see. In this specific case, the new post hasn't been a child yet, so both exclude and hide couldn't detect that. So the rules couldn't work.

    I will think more about this specific case between add new post and edit an existing post. This probably is the same as this problem.

    in reply to: is_child not working as expected #2184
    Anh TranAnh Tran
    Keymaster

    Hi,

    Are you using both exclude and hide at the same time? If exclude rule is there, then meta box is not outputted in the page and thus, the hide rule doesn't work.

    in reply to: Checkbox checked by default #2183
    Anh TranAnh Tran
    Keymaster

    Yes, it is. You need to set the 'std' => 1.

    Anh TranAnh Tran
    Keymaster

    Hi ClementN,

    You can use Conditional Logic in this case. Just add

    
        'visible'	 => array('original_post_status', '!=', 'publish'),
    

    When you want to show meta box when post is not published, and vice versa.

    In case you want to show post on specify post status like publish, draft... just put the original status to the value of conditional logic, like so:

    
        'visible'	 => array('original_post_status', 'auto-draft'),
    

    For example:

    
    add_filter( 'rwmb_meta_boxes', function( $meta_boxes )
    {
    	$meta_boxes[] = array(
            'title'      => 'Media',
            'visible'	 => array('original_post_status', '!=', 'publish'),
            'fields'     => array(
                array(
                    'name' => 'URL',
                    'id'   => 'tanurl',
                    'type' => 'text',
                ),
            )
        );
    
    	return $meta_boxes;
    } );
    

    Best regards

    Tan Nguyen

    in reply to: Date options for shortcode #2174
    Anh TranAnh Tran
    Keymaster

    Hi,

    There is no options for date formatting. The value users set in the admin area when editing the post is the value you will get and show via the shortcode. If you want to change the format of the displayed date, you have to write the code yourself.

    in reply to: Are those fields saved ? #2173
    Anh TranAnh Tran
    Keymaster

    No, they aren't. These fields are used to show content in the meta boxes only.

    in reply to: What's the advantage of fieldset-text ? #2156
    Anh TranAnh Tran
    Keymaster

    This field type allows you to create a group of text fields. For example you want to store info of a book author with Name, Address, Email, you can define a field set text like in this demo. When getting value with rwmb_meta, you will receive an array( 'name' => '...', 'address' => '...', 'email' => '...' ).

    It's similar to group extension but less flexible.

    in reply to: Behavior when field is empty #2155
    Anh TranAnh Tran
    Keymaster

    Yes, if field is empty, then the meta is removed for that post to keep the database clean.

    in reply to: Post id within the register metabox #2154
    Anh TranAnh Tran
    Keymaster

    You can use this simple code:

    $post_id = isset( $_GET['post'] ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : false );

    in reply to: Include/Exclude for new/existing posts #2153
    Anh TranAnh Tran
    Keymaster

    Nice solution. This is not supported by the plugin by default and it's nice to know that can be solved with another solution.

    in reply to: Posts and Users without listing them #2144
    Anh TranAnh Tran
    Keymaster

    The Text field has autocomplete attribute which you can choose from the list or enter custom value. You can check that field ๐Ÿ™‚

    in reply to: The Metaboxes order #2140
    Anh TranAnh Tran
    Keymaster

    The order you register meta boxes is the order of them when you see. But if you have changed their order by drag and drop them manually, then that order will be saved and used in the future. In that case you need to reorder them manually again.

    in reply to: Help with Sections #2137
    Anh TranAnh Tran
    Keymaster

    I was able to test your full code with the FTP details you just sent. However, it looks right in my localhost:

    So strange :(. Can you check again, or please send me the URL of your website so I can have closer look?

Viewing 15 posts - 3,601 through 3,615 (of 3,958 total)