Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello Julia,
For the CPT, you can deactivate Meta Box to use the code to register the CPT. It's the WordPress function register_post_type() with arguments.
For custom fields, you still need to activate Meta Box to register custom fields. Please follow the documentation https://docs.metabox.io/creating-fields-with-code/
Peter
ModeratorHello Jason,
If you want to use the SVG image code (embed directly to HTML), please use the field
text. If you want to use the SVG image file, please use some image fields to upload the file.Peter
ModeratorHello,
To duplicate a post/page, you can use a third party plugin like Yoast Duplicate Post https://wordpress.org/plugins/duplicate-post/
But I'm not sure if it is compatible with Meta Box to duplicate the field value saved in the custom table. If not, you will need to use the public API to update the field value to the duplicate post https://docs.metabox.io/extensions/mb-custom-table/#apiMay 18, 2023 at 7:35 PM in reply to: ✅MB Views shortcode not rendering in block theme template #41844Peter
ModeratorHello,
If you use another shortcode, for example https://codex.wordpress.org/Shortcode_API, does it render properly?
May 16, 2023 at 10:57 PM in reply to: ✅"Group Title" shows the text "{subfield_id}" instead of the value #41838Peter
ModeratorHello,
I see that issue on my demo site after importing the field group. I'm checking the issue with the development team and get back to you later.
Peter
ModeratorHello Mark,
I'm not sure if it is the best way to update the user meta but if a third-party plugin can help you to check if the user watched the full video, you can create a callback function and update the user meta by using the function:
-update_user_meta()https://developer.wordpress.org/reference/functions/update_user_meta/
- orrwmb_set_meta()https://docs.metabox.io/functions/rwmb-set-meta/Peter
ModeratorHello,
You can try to use the function
\MetaBox\CustomTable\API::exists()in the callback function, which hooks torwmb_before_save_postaction, to check if there is a row in the custom table for the current post (object) and do your stuff then.Refer to the documentation https://docs.metabox.io/extensions/mb-custom-table/#exists
Peter
ModeratorHello,
Just to clarify, the issue relates to the Custom Post Type and it's not an issue of Meta Box itself. MB CPT helps you to register the post type with UI instead of using the standard WordPress code https://developer.wordpress.org/reference/functions/register_post_type/
Secondly, you can try to change the code
$current_post_id = get_the_ID();to$current_post_id = get_queried_object_id();to get the current post ID.Peter
ModeratorHello,
There is no issue with MariaDB 10.6. If the WordPress site can work with this DB engine, Meta Box can work too. Please read more about WordPress requirements here https://developer.wordpress.org/advanced-administration/before-install/
Peter
ModeratorHello,
Can you please put the code to the file functions.php with a higher priority (like init hook and priority 99) in the theme folder and check the issue again? It is possible that the code is executed before Meta Box functions run so there is an error
Class 'MB_Relationships_API' not found.Peter
ModeratorHello,
Please access the database and try to create a test table manually and see how it goes.
If it is created, then try to deactivate all plugins except Meta Box, MB extensions and switch to the default theme of WordPress and check the issue again
If it is not created, then check the permission of the user if you have full privilege to create a table in the database.May 14, 2023 at 9:04 PM in reply to: Post Field: 'Set as Parent' Does not save field value in Custom DB Table #41818Peter
ModeratorHello,
I've created a feature request and our development team will consider supporting this feature in future updates.
Regarding the saving field value manually, you can use the function
rwmb_request()->set_post_data( $_POST );with the hookrwmb_before_save_postor functionupdate_post_meta()with the hookrwmb_after_save_post.
Refer to the documentation
https://docs.metabox.io/actions/rwmb-before-save-post/
https://docs.metabox.io/actions/rwmb-after-save-post/Peter
ModeratorHello Yasmine,
I've tried to export the field group on your staging site and import it on my demo site. After adding the field value and using the code, I see the subfield values display on the frontend correctly.
You can try to create another field group and check this issue again.May 13, 2023 at 9:53 AM in reply to: ✅"Group Title" shows the text "{subfield_id}" instead of the value #41815Peter
ModeratorHello,
Can you please share some screenshots of the field group? Or export it to a JSON file and share it here, I will import the field group to my demo site and check the issue.
May 12, 2023 at 8:43 PM in reply to: ✅Beaver Builder Launch Button Broken when Meta Box fields added to post type #41812Peter
ModeratorHello,
Sorry, a mistake. It's in the Meta Box plugin, please wait for the next update of the plugin or you can try to apply the fix on your end.
-
AuthorPosts