Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,936 through 1,950 (of 3,958 total)
  • Author
    Posts
  • in reply to: MB Meta Term hide my posts meta fields #10811
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've created a test using your code and here is the video: http://recordit.co/nGs41cchuS. It seems to work for me. Am I missing anything?

    in reply to: Metaboxes not visible on Settings page #10809
    Anh TranAnh Tran
    Keymaster

    Thanks a lot for your info. I've found the bug and updated the extension. Please update it to the latest version.

    in reply to: Metaboxes not visible on Settings page #10797
    Anh TranAnh Tran
    Keymaster

    Hi, I've just added your code of the settings page to my localhost and it shows in the Builder. Here is the screenshot:

    https://imgur.elightup.com/KKuYpfL.png

    Perhaps there's something else?

    in reply to: Metaboxes not visible on Settings page #10789
    Anh TranAnh Tran
    Keymaster

    Can you send me the code that registers settings pages? Is it wrapped inside any hook (like 'init')?

    in reply to: Metaboxes not visible on Settings page #10787
    Anh TranAnh Tran
    Keymaster

    I got it. Did you select settings page in the Settings tab of the Builder, like this?

    https://imgur.elightup.com/xWjA7rV.png

    in reply to: Term Meta breaking other custom fields #10782
    Anh TranAnh Tran
    Keymaster

    Hi lukeragno,

    I've tested your code and couldn't detect the problem. It works fine to me. I recorded the video here: http://recordit.co/MrzQxy3BD0

    PS: After debug Max's code, I found a problem is the custom post type was registered too early, before all the "init" hook, where Meta Box starts. So, that's might be the problem. I recommend checking the code again, make sure it looks like

    add_action( 'init', 'my_register_post_type' );

    in reply to: clolor picker field problem with front end forms #10781
    Anh TranAnh Tran
    Keymaster

    Hi,

    Thanks a lot for your comment! I've fixed the bug in the latest version. Please update.

    in reply to: Metaboxes not visible on Settings page #10780
    Anh TranAnh Tran
    Keymaster

    I'm confused about "regular site page". The plugins allows you to:

    • Create a settings page
    • Create meta boxes and fields for that settings page

    Both the steps requires you to put code within functions.php or plugin file. If you use MB Builder, then the Builder can help you do the 2nd step without copy and paste the code into functions.php file.

    in reply to: Metaboxes not visible on Settings page #10773
    Anh TranAnh Tran
    Keymaster

    Hi,

    The settings page must be created using the method the plugin provides. The settings pages that created using normal Settings API are not supported. Because we can't hook into those settings page and show custom fields there.

    Please follow this instruction to create settings pages. It's very similar to Settings API.

    in reply to: Metabox Height Not Expanding #10772
    Anh TranAnh Tran
    Keymaster

    Hi Thomas,

    I've just fixed it. Please try the latest version on Github.

    in reply to: Can't get Meta Box Custom Table to work #10771
    Anh TranAnh Tran
    Keymaster

    Hi kesit,

    You need to write custom code to move the data from custom fields to custom table. Here is a sample code:

    $post_id = 1;
    $fields = ['field_1', 'field_2'];
    $table = 'your_custom_table';
    
    $row = ['ID' => $post_id];
    foreach ( $fields as $field ) {
        $row[$field] = get_post_meta( $post_id, $field, true );
    }
    global $wpdb;
    $wpdb->insert( $table, $row );
    in reply to: Can't get Meta Box Custom Table to work #10753
    Anh TranAnh Tran
    Keymaster

    Hi,

    In the docs:

    BLOB and TEXT columns also can be indexed, but a fixed length must be given. Make sure you set the length when you want to index a text column.

    In your code, you make the test_column indexed, but it doesn't have a fixed length. So the code won't run. Change it to the following code will work:

    MB_Custom_Table_API::create( $wpdb->prefix.'data_khusus', array(
        'test_column' => 'VARCHAR(20) NOT NULL',
        'test_column2' => 'TEXT NOT NULL',    
    ), array( 'test_column' ) );
    Anh TranAnh Tran
    Keymaster

    Hi,

    How is the CPT registered? With init hook and priority = 10?

    in reply to: featured image from attached images #10751
    Anh TranAnh Tran
    Keymaster

    Hi Dan,

    The function get_the_post_thumbnail has a filter post_thumbnail_html that you can use to output the correct image:

    add_filter( 'post_thumbnail_html', function( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
        $gallery = rwmb_meta( 'field_id', array( 'size' => $size ), $post_id );
        if ( empty( $gallery ) ) {
            return $html;
        }
        $image = reset( $gallery );
        $html = wp_get_attachment_image( $image['id'], $size, false, $attr );
        return $html;
    }, 10, 5 );
    in reply to: Multiple Address Fields for a Single Post #10750
    Anh TranAnh Tran
    Keymaster

    Hi Bernhard,

    We've just updated the MB Geolocation which now support multiple autocomplete address fields. Please update and let me know how it goes.

Viewing 15 posts - 1,936 through 1,950 (of 3,958 total)