Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,956 through 2,970 (of 3,707 total)
  • Author
    Posts
  • in reply to: Get the terms doesn't work in admin after update #4530
    Anh TranAnh Tran
    Keymaster

    I guess you probably add filter too soon, when the get_the_terms function doesn't exists. You might want to change your code to something like:

    add_action( 'after_setup_theme', function() {
        add_filter( 'rwmb_meta_boxes', 'prefix_register_meta_boxes' );
    } );

    This way, your function runs at after_setup_theme where all WP functions are available.

    in reply to: How to assign roles to meta boxes using the MB #4529
    Anh TranAnh Tran
    Keymaster

    Yes, you should use the extension "MB Include Exclude". It supports to control the visibility of a meta box based on user role.

    in reply to: "group" inside the "oembed" output video; #4528
    Anh TranAnh Tran
    Keymaster

    The group field doesn't auto turn the oembed URL into the video. To do that, you need to use a helper code, like this:

    $url = $group['paragraph_movie'];
    echo RWMB_OEmbed_Field::get_embed( $url );
    in reply to: How to display in front end #4515
    Anh TranAnh Tran
    Keymaster

    You mean when changing field_type, the returned value changes? Can you post the code to register this field to check? Thanks.

    in reply to: Sort order of 'post' field #4514
    Anh TranAnh Tran
    Keymaster

    That's correct! I forgot that you're using the Builder extension ๐Ÿ™‚

    in reply to: Sort order of 'post' field #4505
    Anh TranAnh Tran
    Keymaster

    Hi Mark, you can add params to the query_args to specify the order like 'orderby' => 'post_title'.

    in reply to: Translating Tabs #4504
    Anh TranAnh Tran
    Keymaster

    I'm not sure I get what you want! I think using WPML for translation always put something in the DB.

    Maybe you should localize your theme/plugin using .po file. Then use poEdit to make translation. That way there's nothing stored in the DB (and you also don't use WPML).

    in reply to: How to display in front end #4503
    Anh TranAnh Tran
    Keymaster

    From the error above, I guess the problem isn't the code. Probably one of the selected term was deleted or not available. That's why it returns an WP_Error object. Please check that.

    in reply to: Translating Tabs #4494
    Anh TranAnh Tran
    Keymaster

    Did you try this docs? https://wpml.org/documentation/getting-started-guide/string-translation/

    in reply to: Using oEmbed field and warning message #4493
    Anh TranAnh Tran
    Keymaster

    Sorry, I was thinking this issue is on Github and track there. Please post the code you use to register meta boxes.

    in reply to: Sortable custom admin columns? #4488
    Anh TranAnh Tran
    Keymaster

    I see!

    Does your code above work? Because if you set your custom column sortable that way, WordPress simply sets orderby=navn and you have to hook to pre_get_posts to filter by that.

    By the way, to add sortable columns, you don't need to add a new filter to the extension. WordPress has that filter already (that the extension uses). You can refer to this article for more info:

    https://code.tutsplus.com/articles/quick-tip-make-your-custom-column-sortable--wp-25095

    in reply to: Connecting Gravity Forms to User Box #4487
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    Both plugins work well together without doing anything. Just remember to setup the field ID in MB User Meta match the meta field in Gravity Forms.

    in reply to: Upgrade to Developer Bundle #4485
    Anh TranAnh Tran
    Keymaster

    I answered Dave via email. If anyone is interested in this, the answer is yes. Please just purchase the Developer Bundle and I will refund the part for Core Bundle.

    Anh TranAnh Tran
    Keymaster

    Hi, can you please post the code you're using to register meta box? The old problem was resolved and I test with the original code in this thread again and it works.

    in reply to: Display image by id using image_advanced? #4475
    Anh TranAnh Tran
    Keymaster

    You can use this code:

    $groups = rwmb_meta( 'group_id' );
    $first_group = !empty( $groups ) && is_array( $groups ) ? reset( $groups ) : array();
    $images = !empty( $first_group['album_images'] ) && is_array( $first_group['album_images'] ) ? $first_group['album_images'] : array();
    $first_image = !empty( $images ) && is_array( images ) ? reset( $images ) : 0;
    
    echo wp_get_attachment_image( $first_image, 'thumbnail' );

    PS: Are you using the Group extension? I see you didn't purchase it.

Viewing 15 posts - 2,956 through 2,970 (of 3,707 total)