Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
What do you mean "Without using code at the beginning to create a plugin"? You can add all the code generated by the online tools to one place of the advanced scripts. For further using that plugin, you can contact their support.
Long Nguyen
ModeratorHi,
Thanks for your idea.
The map has not supported this feature yet. I'm going to create a feature request for the developer team to support it. You can use another third-party plugin to create a route between two points on Google Map, such as https://wordpress.org/plugins/codepeople-post-map/.
Long Nguyen
ModeratorHi,
You can check the user role before registering the relationship, for example:
add_action( 'mb_relationships_init', function() { $user = wp_get_current_user(); if ( in_array( 'editor', (array) $user->roles ) ) { MB_Relationships_API::register( [ 'id' => 'posts_to_users', 'from' => array( 'object_type' => 'post', 'post_type' => 'post' ), 'to' => array( 'object_type' => 'user', 'field' => array( 'query_args' => array( 'role__in' => array( 'author', 'subscriber' ) ) ) ), ] ); } } );Refer to this topic: https://wordpress.stackexchange.com/questions/5047/how-to-check-if-a-user-is-in-a-specific-role
Long Nguyen
ModeratorHi Maxim,
This article might help you to duplicate post types by using the code https://hookagency.com/add-duplicating-function-to-posts-and-pages-without-a-plugin/.
February 21, 2021 at 8:57 PM in reply to: ✅Open Street Maps: Exposing Latitude, Longitude, Zoom Level #24518Long Nguyen
ModeratorHi Mauro,
Please update the newest version of MB Geolocation v1.3.1 to make it works. Get the sample case here https://github.com/wpmetabox/meta-box-geolocation/blob/master/tests/osm.php.
February 21, 2021 at 4:17 PM in reply to: ✅One to Many relationship working only with builder #24517Long Nguyen
ModeratorHi,
I'm going to add this feature request to the to-do list of the development team. It will be included in the next updates as soon as possible.
Thank you.
Long Nguyen
ModeratorHi,
Thank you for your reporting. I'm going to check this case and inform you later.
Long Nguyen
ModeratorHi Dragan,
Here is the sample code:
'to' => array( 'object_type' => 'user', 'field' => array( 'max_clone' => 1, 'query_args' => array( 'role__in' => array( 'administrator', 'subscriber' ) ) ) ),Get more details on this documentation https://developer.wordpress.org/reference/functions/get_users/.
Long Nguyen
ModeratorHi Maxim,
Please follow this topic to know how to re-order the menu dashboard by coding
https://wordpress.stackexchange.com/questions/276230/how-can-i-control-the-position-in-the-admin-menu-of-items-added-by-pluginsor by a plugin https://wordpress.org/plugins/admin-menu-editor/.
Long Nguyen
ModeratorHi Oli,
For simplicity, you can just add the code generated by Online tools to the file functions.php in the theme/child theme folder to remove all extra plugins.
Or use with the plugin Advanced Scripts:
- Location: everywhere
- Hook: init
- Priority: 20Long Nguyen
ModeratorHi Oli,
Not sure what you want to style Meta Box fields. Please aware that Meta Box helps you to create the custom fields easier.
Then you can add the value for the field of a post/page and get the value in the Oxygen builder to show on the frontend.
Refer to this topic to get value from Meta Box fields with the custom function https://support.metabox.io/topic/https-url-of-single-image-original-size/.
Long Nguyen
ModeratorHi Oli,
I think your project needs a lot of code to do, not just by using Oxygen and I'm afraid the fields are out of scope. We have not had any field like that, you can use a third-party plugin to do.
https://wordpress.org/plugins/wp-postratings/
https://wordpress.org/plugins/wp-comment-fields/Long Nguyen
ModeratorHi Oli,
There is an extension MB Custom Post Types & Custom Taxonomies which helps you to create a post type with a few clicks without touching the code.
Get more details on this documentation https://docs.metabox.io/extensions/mb-custom-post-type/.
Long Nguyen
ModeratorHi pza,
Can you please export your field group and share it here? I will check it on my local site.
February 19, 2021 at 1:11 PM in reply to: ✅How can I use the custom asset callback to render a block properly? #24487Long Nguyen
ModeratorHi,
To use the custom assets in the Builder, you need to add your function code to the file functions.php in the theme/child theme folder.
Ex:
function my_callback() { wp_enqueue_script( 'my-script', 'link-to-js-file', [ 'jquery' ], '', true ); }then add the function name to Custom assets callback input. Screenshot https://share.getcloudapp.com/yAu60e2J.
-
AuthorPosts