Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 661 through 675 (of 3,702 total)
  • Author
    Posts
  • 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

    Anh TranAnh Tran
    Keymaster

    Hi Robert, thanks for your feedback. I've just reuploaded the zip file to the server. Please try again.

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

    That probably relates with the permission that WordPress gives to the author. Please try with the code that adjust capabilities in this docs.

    in reply to: Can not find where to put the license code #16480
    Anh TranAnh Tran
    Keymaster

    Hi Robert,

    If you don't have any premium extension installed, then the plugin is smart enough to hide the License menu for you. In that case, you don't need to enter any license key at all.

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

    Hi Kevin, the std param should work on both back end and front end. I added some docs on setting std for groups a couple of days ago, please take a look.

    in reply to: Save multiple posts at once #16478
    Anh TranAnh Tran
    Keymaster

    I may decide to only let the form input one at a time, and make sure it’s done via AJAX so it’s done fast enough that the user doesn’t mind…

    Good idea. I didn't think about it.

    If you go with event = post (with custom table), then you'll have 2 row in the DB. One in the posts table, which looks like a normal post. One in the custom table for event details. The custom table will help you query fast, while the default posts table helps you to have UI in the back end.

    in reply to: Clonable select_advanced with ajax #16477
    Anh TranAnh Tran
    Keymaster

    You probably don't need to implement custom solution for ajax anymore. We have added ajax support for object fields in version 5.2. See this blog post for details.

    in reply to: Warning on metabox for relationship to multiple CPTs #16476
    Anh TranAnh Tran
    Keymaster

    Hi,

    When creating relationship, please set the post_type parameter to a single post type. It doesn't accept multiple post types.

    in reply to: AIO: 1.10.1 Error Notice in MB Rest API #16475
    Anh TranAnh Tran
    Keymaster

    Hi Austin, I've just checked and don't see the bug. Can you give me some details on that? What code do you use to register the meta box?

    in reply to: How to disable submit when selecting an address? #16459
    Anh TranAnh Tran
    Keymaster

    Just fixed this issue in the latest version of MB Geolocation.

    in reply to: The "Meta Box" way to disable Autocomplete & Autofill? #16458
    Anh TranAnh Tran
    Keymaster

    Unfortunately, it's not possible, since the form is not created by the plugin. The form is created by WP, so I think your solution here is the best one if you want to add autocomplete attribute to the entire form.

    in reply to: Show data from related post/term after selection #16457
    Anh TranAnh Tran
    Keymaster

    Hi,

    Do you mean showing the data dynamically, based on the user selection of related posts/terms? If yes, then I think you'll have to do that your way with JS + custom HTML field.

Viewing 15 posts - 661 through 675 (of 3,702 total)