Forum Replies Created
-
AuthorPosts
-
October 15, 2019 at 4:41 PM in reply to: ✅How can I use MB-Blocks as template registered post type? #16529
Anh Tran
KeymasterHello,
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.
October 15, 2019 at 4:34 PM in reply to: ✅Adding Customizer Options to Page Builder Framework #16528Anh Tran
KeymasterHi 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' => trueAnd you'll have your own panel. I have written this in the docs, please take a look.
Anh Tran
KeymasterHi 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' ); } );October 15, 2019 at 4:29 PM in reply to: Using settings values for use in other metabox settings? #16526Anh Tran
KeymasterHi, 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.
Anh Tran
KeymasterHi Kevin, I see the problem. Let me check and fix it.
October 12, 2019 at 9:41 AM in reply to: ✅Adding Customizer Options to Page Builder Framework #16494Anh Tran
KeymasterHi Mark,
The
parentparam is used to specify the parent menu in the WP admin area. Setting it tothemes.phpmake 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
panelattribute 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
panelparameter to put the section under other panels. Here is how to find the panel IDs:October 12, 2019 at 8:38 AM in reply to: ✅MB Term Meta does not change version number after update 1.2.5 to 1.2.6 #16493Anh Tran
KeymasterHi Robert, thanks for your feedback. I've just reuploaded the zip file to the server. Please try again.
Anh Tran
KeymasterThat probably relates with the permission that WordPress gives to the author. Please try with the code that adjust capabilities in this docs.
Anh Tran
KeymasterHi 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.
Anh Tran
KeymasterHi Kevin, the
stdparam should work on both back end and front end. I added some docs on settingstdfor groups a couple of days ago, please take a look.Anh Tran
KeymasterI 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.
Anh Tran
KeymasterYou 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.
October 11, 2019 at 2:38 PM in reply to: ✅Warning on metabox for relationship to multiple CPTs #16476Anh Tran
KeymasterHi,
When creating relationship, please set the
post_typeparameter to a single post type. It doesn't accept multiple post types.Anh Tran
KeymasterHi 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?
Anh Tran
KeymasterJust fixed this issue in the latest version of MB Geolocation.
-
AuthorPosts