Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,911 through 2,925 (of 3,702 total)
  • Author
    Posts
  • in reply to: Add new group on the top (with the button) #4780
    Anh TranAnh Tran
    Keymaster

    Hi, currently the position of the new clone is hardcoded in meta-box/js/clone.js file as you can see here:

    http://prntscr.com/duj1eg

    The group extension doesn't change this behavior.

    For now, the only way to change that is changing the code directly.

    I'm thinking about adding a new option to Meta Box to reposition the "Add New" button and the position of the new clone.

    in reply to: Add Group #4778
    Anh TranAnh Tran
    Keymaster

    Oh, sorry. I didn’t notice this is for MB Builder.

    To add subfields to a group in the Builder, just drag fields to be a child item of the group item (think like you drag and drop the sub menu in the Appearance > Menus).

    in reply to: Add Group #4777
    Anh TranAnh Tran
    Keymaster

    Just think "group" is a special field. The only difference is it has fields parameters, which is an array of fields. This is a sample code:

    $meta_box = array(
        ’title’ => ’Test’,
        'fields' => array(
            // Group
            array(
                'id' => 'group_id',
                ’type’= > 'group',
                
                // Subfields
                'fields' => array(
                    array(
                        'id' => ’text',
                        ’type’ => ’text’,
                        ’name’ => ’Text’,
                    ),
                    // Other subfields go here
                ),
            ),
        ),
    );
    in reply to: Call to undefined function rwmb_meta() #4772
    Anh TranAnh Tran
    Keymaster

    Hi Yumikom,

    Maybe the theme or the plugin you're using has a call to the function "rwmb_meta()" when the Meta Box plugin is not loaded (or activated). It's better to change the code to:

    if ( function_exists( 'rwmb_meta' ) ) echo rwmb_meta( 'field_id' );

    If your field is a simple field (like text or textarea), you should use get_post_meta(), like this:

    echo get_post_meta( get_the_ID(), 'field_id', true );

    rwmb_meta() is just a wrapper of get_post_meta. Using get_post_meta might give you a better performance.

    in reply to: YOAST and wysiwyg support #4770
    Anh TranAnh Tran
    Keymaster

    To support Yoast SEO plugin, please install this extension. It works well with the Tabs extension.

    in reply to: YOAST and wysiwyg support #4766
    Anh TranAnh Tran
    Keymaster

    It supports wysiwyg field.

    What do you mean supporting yoast? Is it like this?

    in reply to: Paragraphs not output on WYSIWYG field type #4759
    Anh TranAnh Tran
    Keymaster

    The WYSIWYG field doesn't output the "p" tag by default. It can be done using the "wpautop" function like this:

    echo wpautop( rwmb_meta( 'field_id' ) );

    in reply to: Clonable groups not show only one sub-field #4749
    Anh TranAnh Tran
    Keymaster

    Hi, I see you missed the param clone for the group field, so it can't be cloned.

    Here is the fixed code (I fixed the syntax also):

    title: Prazos
    fields:
      - name: Group
        id: grop_name
        type: group
        fields:
          - name: Group
            id: group_1
            type: group
            clone: true
            fields: 
              - name: test
                id: test
                type: text
              - name: test1
                id: test1
                type: text
              - name: test2
                id: test2
                type: text
    in reply to: Plan Update #4748
    Anh TranAnh Tran
    Keymaster

    Hi, I've just added an upgrade message and buttons in the profile page. Please go to "My Account" (link on the top right or click on your avatar) and upgrade.

    Please let me know if you need anything else.

    in reply to: Clonable groups not show only one sub-field #4742
    Anh TranAnh Tran
    Keymaster

    Hi, can you show me the code to create meta boxes?

    in reply to: orderby date #4738
    Anh TranAnh Tran
    Keymaster

    If so, you can set the timestamp parameter for the field true. This will make the field save the timestamp instead of date string, so you can sort by that, while still display in the correct format to users.

    You can see the docs here.

    in reply to: orderby date #4736
    Anh TranAnh Tran
    Keymaster

    You query is correct. However, the problem here is the value you saved for date has the format "dd/mm/yyyy" which will cause the incorrect order when sorting. I suggest you use "yyyy-mm-dd" format, which is safe when ordering.

    in reply to: Checkbox List #4722
    Anh TranAnh Tran
    Keymaster

    Hello, please take a look at this sample code:

    https://gist.github.com/rilwis/a05896c8c3782d20369743fde68edcf8

    Anh TranAnh Tran
    Keymaster

    Currently not, but I think and "id" should be:

    - unique per fields
    - use only lower characters with dash or underscores to separate words (think it like slugs or keys of an array)

    That's all. Very simple 🙂

    in reply to: Shortcode in WYSIWYG type #4701
    Anh TranAnh Tran
    Keymaster

    That's correct. The field doesn't apply any filters to make shortcode runs. The filter the_content does that. But you might want to use just do_shortcode() function as the_content often triggers some other unexpected functions (like social plugin might hook into it to insert social buttons).

    $text = rwmb_meta( 'wsmbox_page_two_columns_text' );
    echo do_shortcode( wpautop( $text ) );
Viewing 15 posts - 2,911 through 2,925 (of 3,702 total)