Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,461 through 2,475 (of 4,839 total)
  • Author
    Posts
  • in reply to: Dashboard #30594
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The integration is now on the testing version, please try to send your feedback to the Oxygen development team to fix this issue.

    Thank you.

    in reply to: Display fileds from network settings page #30582
    Long NguyenLong Nguyen
    Moderator

    Hi Eliott,

    1. You need to get the main group value from the network setting first.
    2. $global_media_network = rwmb_meta( 'global_media_network', ['object_type' => 'network_setting'], 'map');
      

      Follow this documentation https://docs.metabox.io/extensions/mb-settings-page/#getting-field-value

    3. Then access the sub-group and field value based on the ID. Here is the sample code:
    // Display images
    $global_media_network_group_images = $global_media_network['global_media_network_images_group']['global_media_network_group_images'];
    foreach ( $global_media_network_group_images as $image_id ) {
        $image = RWMB_Image_Field::file_info( $image_id, array( 'size' => 'large' ) );
        echo '<img src="' . $image['url'] . '">';
    }
    
    // Display wording
    $global_media_network_cta_wording = $global_media_network['global_media_network_cta']['global_media_network_cta_wording'];
    echo $global_media_network_cta_wording;

    Follow this documentation https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-values

    in reply to: Admin column clickable to filter #30579
    Long NguyenLong Nguyen
    Moderator

    Hi,

    When registering the custom taxonomy, you can enable the option "Show admin column", screenshot https://share.getcloudapp.com/z8urLLW9

    It works like the Categories or Tags columns on the listing post and is filterable when clicking on the term item.

    in reply to: ℹ️Shortcode vs #30578
    Long NguyenLong Nguyen
    Moderator

    Hi,

    1. Regarding the shortcode:
      You should wrap the SMS link in a <a> tag to allow the user to click on a button to send the SMS instead of sending SMS on page load. Like this
    2. return '<a href="sms:12345">Link</a>';
      
    3. Regarding the admin field:
      Ok, I understand your expectation. If you want to update a value to a field, please use the function update_post_meta(). The function to update the admin field value should be
    function admin_sms_text( $post_id ) {
        $meta_name = rwmb_meta( 'main_contact', '', $post_id );
        $meta_phone = rwmb_meta( 'cellular_phone_number', '', $post_id );
        $meta_custom_message = rwmb_meta( 'text_message', '', $post_id);
        $page_url = get_permalink();   
    
        $text_message = 'sms:'.$meta_phone.'?&body=Hey there, it\'s '.$meta_name.'. '.$meta_custom_message.' '.$page_url;
        
        update_post_meta( $post_id, 'custom_sms_text', $text_message ); //here, the field ID (meta key) should be predefined
    }
    in reply to: Show or Hide Fields Based On Role #30573
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thanks for your feedback. I'm going to inform the developer team to consider adding it to the to-do list for the future development of the plugin.

    in reply to: People and reviews. #30572
    Long NguyenLong Nguyen
    Moderator

    Hi Paul,

    Meta Box and extensions do not support creating a post type from another post type like that. You can use the plugin Post Type Switcher to switch it to another one https://wordpress.org/plugins/post-type-switcher/

    Or follow this link to copy all posts from a post type to another one https://gist.github.com/HarishChaudhari/ea4ec39670135b03babd

    in reply to: Custom rewrite slug doesn't work #30571
    Long NguyenLong Nguyen
    Moderator

    Hi Cees,

    The plugin helps you to rewrite the taxonomy slug doesn't mean removing it. If you want to remove the taxonomy slug from the URL, you can follow this topic to do that.
    https://stackoverflow.com/questions/41230665/how-to-remove-taxonomy-slug-from-custom-post-type-url/53551028

    in reply to: Text fields erasing styling #30570
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Each field has its own sanitize callback function so you need to set it to "none" for each field when registering/creating. There is no way to apply that to all fields.

    in reply to: Copying Group field entries from another custom post type? #30568
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The Block editor does not support reloading the page after updating the post. You can use the Classic editor instead of the Block editor.

    in reply to: shortcode to show User meta type "Select Avanced" #30567
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You need to pass the user ID through the attribute object_id to the shortcode to show the user meta, like this

    [rwmb_meta id="tm-schedule-check" object_type="user" object_id=1]

    in reply to: ℹ️Shortcode vs #30566
    Long NguyenLong Nguyen
    Moderator

    Hi,

    I think it's not a good idea because you don't know exactly the meta key that is saved into the database based on the field custom_sms_text value. Using the shortcode to show the SMS text would be better.

    in reply to: File advanced rwmb_meta helper, array error #30555
    Long NguyenLong Nguyen
    Moderator

    Hi,

    That means on the backend, the helper function gets the wrong third argument $post_id. You can try to put the post ID to the helper function and re-check it.

    $files = rwmb_meta( 'cf-den-1-ustanoveni', array( 'limit' => 1 ), 1234 );
    

    Get more details on the documentation https://docs.metabox.io/rwmb-meta/#arguments

    in reply to: Show or Hide Fields Based On Role #30554
    Long NguyenLong Nguyen
    Moderator

    Hi Martin,

    The extension MB Conditional Logic does not support show/hide a field based on user role. You can use the extension MB Include Exclude to do that and separate fields for other meta boxes.

    in reply to: Don't save "select" value in database if select is not picked #30553
    Long NguyenLong Nguyen
    Moderator

    Hi,

    On my sample code above, there is no required setting of the select field. You just need to set this to the text field.

    Regarding the standard (Default) value, you can use the setting placeholder instead to prevent save the default value.

    Long NguyenLong Nguyen
    Moderator

    Hi,

    FYI, the settings under tinymce are applied to the Visual tab. The settings under quicktags are applied to the Text or HTML tab.

    'fields'     => [
        [
            'type' => 'wysiwyg',
            'id'   => 'content123',
            'name' => 'Descripción',
            'save_field' => false,
            'options' => [
                'textarea_rows'   => 3,
                'media_buttons'    => false,
                'teeny' => false,
                'quicktags' => [
                    'buttons' => 'strong,em,u,link,ul,ol,li',
                ],
                'tinymce' => [
                    'toolbar1' => 'bold,italic',
                ]
            ]
        ],
    ],

    See my screenshots
    https://share.getcloudapp.com/Wnu0kybY
    https://share.getcloudapp.com/Qwu52L0G

    Read more on the documentation
    https://codex.wordpress.org/TinyMCE
    https://codex.wordpress.org/Quicktags_API

Viewing 15 posts - 2,461 through 2,475 (of 4,839 total)