Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 676 through 690 (of 3,958 total)
  • Author
    Posts
  • in reply to: Page VIew #16583
    Anh TranAnh Tran
    Keymaster

    Hi,

    I'm not quite clear about the question. Each post type registered with the plugin is a normal WordPress post type, which uses single-{$post_type}.php template file to display (and fallback to single.php. See WordPress docs for more details.

    The URL for each post in the post type is automatically generated if you set the permalink to something different than the default.

    in reply to: Group "std" doesn't work on frontend ? #16581
    Anh TranAnh Tran
    Keymaster

    Hi Kevin,

    Thanks a lot for your help. I was able to fix this issue another way and just released the version 1.3.6 of the plugin. Meta Box AIO and MB Core will be released later today.

    in reply to: MB Settings Page in REST API #16580
    Anh TranAnh Tran
    Keymaster

    Hi Tobias,

    At the moment, the settings values are not sent to the REST API via MB REST API. You probably need to write your own route for that.

    in reply to: How can I use MB-Blocks as template registered post type? #16579
    Anh TranAnh Tran
    Keymaster

    I got it.

    The custom blocks registered with MB Blocks have id meta-box/{$block_id}. So you can define your post type template like:

    'template' => ['meta-box/hero', 'meta-box/team-member']
    
    in reply to: Save meta values in database #16578
    Anh TranAnh Tran
    Keymaster

    Hi, please see this video: https://www.loom.com/share/80fa3ff5dc6149a9bd2cb640a62aa69c. I demonstrate how to use rwmb_meta, rwmb_the_value in the block render callback.

    Just a note: when you use these helper functions, don't forget to use the parameter $post_id. If you want to use other WordPress functions, remember to use it as well, or you'll get the wrong info when preview the block in the edit screen.

    in reply to: License key is expired with Lifetime bundle #16577
    Anh TranAnh Tran
    Keymaster

    Hi Sandra, thanks for your feedback. Yes, you have a lifetime license. Let me check that again and will fix the message.

    in reply to: MB Term Meta 1.2.6 saves data to the postmeta table #16576
    Anh TranAnh Tran
    Keymaster

    Hi guys, sorry for this bug. I've just updated the extension to 1.2.7 to fix this. Meta Box AIO & MB Core will be updated later today.

    in reply to: Save meta values in database #16536
    Anh TranAnh Tran
    Keymaster

    So, I can use rwmb_meta in template block?

    Yes, you can.

    Would you add in your roadmap to save meta values as well?

    As I explain in the previous reply, this doesn't work because you can add multiple instances same block. If one field in each blog has different values, then there's no way to decide which value will be save in the post meta.

    in reply to: Save meta values in database #16530
    Anh TranAnh Tran
    Keymaster

    Hi,

    Unfortunately, blocks can save data only to its own. The post meta allows only 1 pair of key-value, but you can add many blocks in a post. So, if that's possible, that might be confusing.

    In order to use meta values in a block template, you can simple register meta fields normally with Meta Box, and use helper functions rwmb_meta to get them to show.

    in reply to: How can I use MB-Blocks as template registered post type? #16529
    Anh TranAnh Tran
    Keymaster

    Hello,

    I'm not sure what you meant. If a post has block editor enabled, then all the registered blocks are available. Or did you mean to set the default content for a post of a specific post type? I found a post on this topic, but not sure if that works for Gutenberg.

    in reply to: Adding Customizer Options to Page Builder Framework #16528
    Anh TranAnh Tran
    Keymaster

    Hi Mark,

    Glad you see it works.

    Regarding the 2nd issue about creating your own panel, it's totally possible. Just create a settings page as usual, then add these params to the settings page array:

    'customizer' => true,
    'customizer_only' => true

    And you'll have your own panel. I have written this in the docs, please take a look.

    in reply to: Error when upload image in author role #16527
    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    Please don't edit WordPress core files. When WordPress updates, it removes your changes.

    I guess the problem here is author doesn't have permission to edit others' posts. In case on the front end, WordPress might think it's not the author's posts, since you're actually on the Edit page (the page that you paste the shortcode).

    So, maybe modifying the user permissions might help. Here is the modified code from the code that allows uploads:

    add_action( 'init', function () {
        if ( is_admin() ) {
            return;
        }
        $author = get_role( 'author' );
        $author->add_cap( 'edit_posts' );
    } );
    in reply to: Using settings values for use in other metabox settings? #16526
    Anh TranAnh Tran
    Keymaster

    Hi, would you mind giving more details on how you setup the settings pages? The latest version has big changes, which we made to work with Customizer/Network settings. Please send me more details to debug on this. In my test with a normal settings page, I couldn't replicate the bug.

    in reply to: Group "std" doesn't work on frontend ? #16495
    Anh TranAnh Tran
    Keymaster

    Hi Kevin, I see the problem. Let me check and fix it.

    in reply to: Adding Customizer Options to Page Builder Framework #16494
    Anh TranAnh Tran
    Keymaster

    Hi Mark,

    The parent param is used to specify the parent menu in the WP admin area. Setting it to themes.php make the settings page appear under "Appearance" menu.

    In case of using Page Builder Framework theme, this theme doesn't have any admin settings page. All of its settings are in the Customizer. So you need to create sections and set the panel attribute to the PBF's panel's ID.

    For example, the code below will create a new section in the Customize -> Blog panel:

    add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
        $meta_boxes[] = array(
            'id'             => 'my-custom-section',
            'title'          => 'Custom Section',
            'panel'          => 'blog_panel', // THIS
            'fields'         => array(
                array(
                    'name' => 'Logo',
                    'id'   => 'logo',
                    'type' => 'file_input',
                ),
                array(
                    'name'    => 'Layout',
                    'id'      => 'layout',
                    'type'    => 'image_select',
                    'options' => array(
                        'sidebar-left'  => 'http://imgur.elightup.com/Y2sxQ2R.png',
                        'sidebar-right' => 'http://imgur.elightup.com/h7ONxhz.png',
                        'no-sidebar'    => 'http://imgur.elightup.com/m7oQKvk.png',
                    ),
                ),
            ),
        );
        return $meta_boxes;
    } );

    And here is the result:

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

    You can change the panel parameter to put the section under other panels. Here is how to find the panel IDs:

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

Viewing 15 posts - 676 through 690 (of 3,958 total)