Support Forum » User Profile

Forum Replies Created

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • in reply to: TypeError: selected.forEach is not a function #11864
    AleAle
    Participant

    Thanks for your reply Anh.

    This are the extensions I use:

    
    // Initialize Metaboxes
    require get_template_directory() . '/lib/metaboxes/meta-box.php';
    // Extensions
    require get_template_directory() . '/lib/extensions/meta-box-builder/meta-box-builder.php';
    require get_template_directory() . '/lib/extensions/meta-box-group/meta-box-group.php';
    require get_template_directory() . '/lib/extensions/meta-box-columns/meta-box-columns.php';
    
    // Create metaboxes
    require_once('metabox-works.php');
    

    I've updated all earlier today with same result.

    Versions:
    metabox 4.15.6
    builder 2.9.4
    group 1.2.16
    columns 1.2.3

    in reply to: TypeError: selected.forEach is not a function #11844
    AleAle
    Participant

    This is the metabox: https://ghostbin.com/paste/mc5bj

    in reply to: TypeError: selected.forEach is not a function #11832
    AleAle
    Participant

    This is the rest of the message:

    reorderSelected http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:13:3
    update
    http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:40:3
    each
    http://colorale.local/wp-admin/load-scripts.php:2:2879
    each
    http://colorale.local/wp-admin/load-scripts.php:2:844
    <anonymous>
    http://colorale.local/wp-content/themes/colorale/lib/metaboxes/js/select-advanced.js:53:31
    i
    http://colorale.local/wp-admin/load-scripts.php:2:27444
    fireWith
    http://colorale.local/wp-admin/load-scripts.php:2:28213
    ready
    http://colorale.local/wp-admin/load-scripts.php:2:30004
    K
    http://colorale.local/wp-admin/load-scripts.php:2:30366
    
    AleAle
    Participant

    Thank you for fixing it!

    AleAle
    Participant

    Thanks

    AleAle
    Participant

    Thanks so much Anh, I didn't know that groups will affect how to display fields on the website.
    Now works very well.

    One more thing is that when adding multiple keys/values to select advanced the Metabox Builder does not create an array but a unique value, if I input the following on the options field:

    Red: red
    Yellow: yellow
    Blue: blue

    The Buuilder creates this and not an array:

    'options' => 'Red: red
    Yellow: yellow
    Blue: blue',
    in reply to: New contexts broken with Gutenberg #11660
    AleAle
    Participant

    Are contexts still not working for Gutenberg?
    Thanks!

    in reply to: Show translated content #11284
    AleAle
    Participant

    Thank you very much Anh! That did the job!

    in reply to: Show translated content #11282
    AleAle
    Participant

    rwmb_the_value returns an unordered list if more than one is selected. Is the a way to return as an array only?

    in reply to: Show translated content #11281
    AleAle
    Participant

    Thanks ANh.

    You are right about not translating both.
    Thanks for the link to rwmb_the_value.

    A way I found was to use esc_html__ for each array item:

                                 <?php
                                    $valueArray  = rwmb_meta( 'mb_languages', array( 'multiple' => true) );
                                    $pieces = array();
    
                                    foreach ($valueArray as $item) {
                                        $pieces [] = esc_html__(  $item,  $domain = 'yanse' );
    
                                    }
                                    echo implode(', ', $pieces);
                                    ?>
    in reply to: Show translated content #11257
    AleAle
    Participant

    Forgot to subscribe to replies...

    in reply to: Metaboxes searchable? #11128
    AleAle
    Participant

    Sorry, my mistake. It is working, what is not possible is to find items in a second query taht shows the fields, I will solve it. Thanks!

    in reply to: Metaboxes searchable? #11125
    AleAle
    Participant

    Thanks Anh,

    I'm not sure why it isn't working but when I add the code from the tutorial to my functions.php it simply doesn't change the results at all.

    If I add teh following code, then the search is broken and I can't find anything at all.

    add_action( 'pre_get_posts', function( $query ) {
        if ( is_admin() || ! $query->is_main_query() ) {
            return;
        }
        $query->set( 'meta_query', [
            'relation' => 'OR',
            [
                'key' => 'mb_someidused',
                'value' => '"' . get_search_query()  . '"',
                'compare' => 'LIKE'
            ]
        ] );
    } );
Viewing 13 posts - 16 through 28 (of 28 total)