Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 721 through 735 (of 3,704 total)
  • Author
    Posts
  • in reply to: Email notification trouble. #16242
    Anh TranAnh Tran
    Keymaster

    Hi Mary,

    Looks like you're using a very old version of PHP, probably 5.2. Please ask your host to update it to the latest version (which is 7.3), or any version >= 5.3. The code then will work.

    in reply to: Displaying Featured Image in Admin Columns #16241
    Anh TranAnh Tran
    Keymaster

    Hi John,

    Please try this snippet:

    add_action( 'admin_init', function() {
        class My_Featured_Image_Columns extends MB_Admin_Columns_Post {
            public function columns( $columns ) {
                $columns  = parent::columns( $columns );
                $position = 'before';
                $target   = 'title';
                $this->add( $columns, 'featured_image', 'Featured Image', $position, $target );
                // Add more if you want
                return $columns;
            }
            public function show( $column, $post_id ) {
                switch ( $column ) {
                    case 'featured_image':
                        the_post_thumbnail( [40, 40] );
                        break;
                    // More columns
                }
            }
        }
    
        new My_Featured_Image_Columns( 'post', array() );
    } );
    Anh TranAnh Tran
    Keymaster

    Hi Przemek,

    That's a rare case. I didn't think about using a same callback function for different blocks.

    Anyway, new version has just been pushed and you can access to the block name via $attributes['name'].

    in reply to: Trouble Using Include/Exclude inside Builder #16239
    Anh TranAnh Tran
    Keymaster

    Hi,

    Why don't you use the "Advanced rules" in the Settings tab? It's for the Include Exclude extension:

    https://imgur.elightup.com/goGTT2V.png

    in reply to: MB Group Clone Shortcode #16238
    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    Please try this code:

    add_shortcode( 'display_cars', function( $atts ) {
        $atts = wp_parse_args( $atts, [
            'post_id' => get_the_ID(),
        ] );
    
        $cars = rwmb_meta( 'car', '', $atts['post_id'] );
        if ( empty( $cars ) ) {
            return '';
        }
        $output = '';
        foreach ( $cars as $car ) {
            $output .= '<h4>', 'Car Details', '</h4>';
            $output .= '<p>', 'Brand:', ' ', $car['brand'], '</p>';
            $output .= '<p>', 'Date Release:', ' ', $car['date'], '</p>';
            foreach ( $car['color'] as $color ) {
                $output .= '<p>', 'Color:', ' <span style="color:', $color, ';"><strong>Color</strong></span></p>';
            }
        }
    } );

    Usage:

    [display_cars] // for the current post
    [display_cars id="123"]
    in reply to: Conditional Logic with Validation #16237
    Anh TranAnh Tran
    Keymaster

    Hi,

    This is a common problem. Logically, when a field is not needed (hidden), it can't be required. In this case it's the price field. Unfortunately, there's no built-in solution for toggling validation rules based field visibility.

    in reply to: Migration Issue #16236
    Anh TranAnh Tran
    Keymaster

    @Dorian: your point on serialized data is great. That might be the root cause of the problem.

    If you have to fix the serialized data after migration, you can try WP CLI with the command search-replace (see this docs) or this script. Both can replace the data without breaking the serialization. There are also some plugins on wordpress.org that can do the same job.

    in reply to: Block not showing in post editor #16235
    Anh TranAnh Tran
    Keymaster

    Hi Michael,

    Can you please share your screenshot? I've just tried the code again and it works.

    in reply to: Metabox fields are not rendering in facetWP builder layout #16234
    Anh TranAnh Tran
    Keymaster

    Hi Saradhi,

    I'm very sorry for the delay. Let me try to help you now.

    I see in the screenshot that the filters are displayed correctly for the posts (honda, subaru, etc.). Did you mean the price didn't show in the filter list? I see you have min/max for price, so that's fine. Please let me know more details on the problem.

    Thanks

    in reply to: Password checks not working #16231
    Anh TranAnh Tran
    Keymaster

    I'm sorry for the delay. I missed your question. I'll correct the docs. Thanks for your feedback!

    Anh TranAnh Tran
    Keymaster

    Hi Aishwarya,

    Yes, that's done. Please update to version 1.3.5. The new settings is class for the settings page.

    FYI: Meta Box 5.2.0 also adds class settings for custom CSS class. So you have more room to customize now.

    in reply to: Admin column indicating pagebuilder being used #16197
    Anh TranAnh Tran
    Keymaster

    I think you might detect them via class_exists() or function_exists(), or is_plugin_active() function.

    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    Are you using the latest version of Meta Box? Can you try clearing browser cache? I've just tested with similar code and couldn't replicate the problem.

    in reply to: Idea: Include links to Docs in AIO settings? #16194
    Anh TranAnh Tran
    Keymaster

    Hi, I've just released a new version for Meta Box AIO, which has a complete redesign for the settings page. It now includes all links to the docs, forums. Please try it.

    Anh TranAnh Tran
    Keymaster

    Yes, I'm finalizing some issues and will release new version for AIO in a few days.

Viewing 15 posts - 721 through 735 (of 3,704 total)