Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,171 through 1,185 (of 3,958 total)
  • Author
    Posts
  • in reply to: Creating a Dashboard #14408
    Anh TranAnh Tran
    Keymaster

    Hi Reinhard,

    Unfortunately, the plugins don't support creating dashboard widgets. Please follow this docs to do so:

    https://codex.wordpress.org/Dashboard_Widgets_API
    https://www.cssigniter.com/make-wordpress-dashboard-widget/
    https://premium.wpmudev.org/blog/adding-custom-widgets-to-the-wordpress-admin-dashboard/

    If you're using Elementor, here is a good tutorial on doing that:

    https://powerpackelements.com/custom-wordpress-dashboard-elementor/

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    Please use either of them. The address field, which is used for autocompletion works only with one map. Putting 2 maps will break the code.

    in reply to: Google Map Module Causing Problems #14406
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    But I was having issues when testing the form… the screen goes blank and eventually times out. Once I remove the map module, the problem goes away immediately.

    Can you give more details about this? Are you testing the form in the back end or front end? Do you see any error in the console? Is the Google Maps API key correct?

    in reply to: Add info box to settings page #14381
    Anh TranAnh Tran
    Keymaster

    Hi Milen,

    That can be done with the Custom HTML field type. I used it a lot in the Demo site. Please take a look.

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    I think that can be done with an extra query to the data base:

    • Make a custom query to the custom table to get the ID of the users you want to select:
    global $wpdb;
    $user_ids = $wpdb->get_col( "SELECT ID FROM yourtable WHERE field_1 = 'value_1'" );
    • Then in your options of the user field, set the include param:
    [
    'type' => 'user',
    'query_args' => [
        'include' => $user_ids, // get from above
    ],
    ]
    in reply to: Open Street Map: available fields #14379
    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    At the moment, we haven't supported OSM for Geolocation extension yet. It was on our plan but we haven't finished it yet. We'll try to do it as soon as we can.

    in reply to: moving to MB custom tables #14378
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    Please try this script (put it in your functions.php file and go to this URL: yourdomain.com?action=migrate):

    https://pastebin.com/BPXTEy6H

    The idea of the script is:

    • Make sure it runs only when the URL contains ?action=migrate to avoid running the script on every page load.
    • Query all the posts that need to migrate the data. You should modify the query to get your correct posts.
    • For each post, get the old meta value for each field. Note about the value format to see if it's an array or simple string.
    • Insert the values into the new table. If the value is an array, it need to be serialized.

    The script comes directly from my mind without testing, so please check it first.

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    There are 2 ways to do that as you already described in your question:

    1. Set the rule for each field in the meta box B, or
    2. Set the rule for the whole meta box B.

    I think the 2nd solution is better and cleaner. This rule should be put in the settings of the meta box B:

    'hidden' => array( 'radio_field_id', '=, 'radio_1' ),

    The rule should specify the field ID, not the meta box ID (since the meta box is just a wrap of fields).

    in reply to: Image in Group #14376
    Anh TranAnh Tran
    Keymaster

    Hi William,

    It's necessary to check if a group has sub-values for title and image. Please try this code:

    <?php
    $product_colour = rwmb_meta( 'product-colour' ); // ID of the group
    if ( ! empty( $product_colour ) ) {
        if ( ! empty( $product_colour['title'] ) ) {
            echo '<h3>', $product_colour['title'], '</h3>';
        }
        if ( ! empty( $product_colour['image'] ) ) {
            $image = RWMB_Image_Field::file_info( $product_colour['image'], ['size' => 'thumbnail'] );
            echo '<img src="', $image['url'], '">';
        }
    }
    ?>
    in reply to: Problem when using Groups with Tabs #14375
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    I've just answered you in another topic. The rule here is: you can add only one tab navigation, no nesting tabs. But for groups, you can add as many groups with any nesting level.

    To make things cleaner on the edit screen, I'd suggest using collapsible groups.

    in reply to: Ignore saved state on REST API #14374
    Anh TranAnh Tran
    Keymaster

    Due to the nature of group, a private key is the only way I found to store the current state of a collapsible group, especially with nested groups.

    I'll make a commit for the REST API extension to strip it from the output.

    Update: the fix is available in the version 1.3.4.

    Anh TranAnh Tran
    Keymaster

    Hi Austin,

    This is a nice improvement. I've just looked at the solution on SE and I think it's quite complicated. Working with WP's Media Library is not easy! Our code for the media fields are not simple, either.

    I'll make a note on this and see if I can improve it. Thanks for your suggestion.

    in reply to: Stacking / Nesting Elements #14372
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    You can put groups inside groups without problems. Group supports nesting to unlimited levels.

    However, tabs are not nesting. So you need to use only one tab style, either on top or left.

    in reply to: Seems error in meta box plugin #14328
    Anh TranAnh Tran
    Keymaster

    Hi Calpaq,

    I've just tested again and don't see the problem. Can you make a screenshot or video?

    in reply to: qtranslate X plugin not working with metabox.io #14327
    Anh TranAnh Tran
    Keymaster

    Hi,

    qTranslate X plugin seems to be abandoned from its author for the last 3 years. I personally don't think it's a good option for a multilingual website. Unfortunately, we don't have an option to make Meta Box work with qTranslate X yet.

Viewing 15 posts - 1,171 through 1,185 (of 3,958 total)