Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello Kevin,
You might need to use the function
rwmb_get_registry()to get all fields. Please read more here https://docs.metabox.io/functions/rwmb-get-registry/Peter
ModeratorHello Andrew,
Please update Meta Box, MB extensions to the latest version, then deactivate all other plugins, switch to a standard theme of WordPress and migrate the field group again.
If it does not help, can you please share some screenshots of the issue and export the field group to a JSON file and share it here? I will take a look.
Please read more on the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import
Peter
ModeratorHello,
Currently, there are no capabilities like that for other default post types of Meta Box, just for CPT
meta-box(Field Groups). It would be a feature request and I will inform our development team to consider supporting this feature in future updates.Peter
ModeratorHello,
I see the field values are saved to the custom table correctly. In the View code, the field "Choose an option" has the ID
choose_an_optionbut you add the IDchoose_an_optionsto get the value and it returns nothing.{% set options = post.choose_an_options.value %}Peter
ModeratorHello,
There are 3 capabilities registered to control the field group, not the relationship. You can find them in the file /meta-box-builder/src/PostType.php
But Meta Box does not support controlling the capabilities for user roles, it is the feature of a third-party plugin. I hope that makes sense.Peter
ModeratorHello,
It looks like there is a plugin that modifies the WordPress query. I've deactivated all plugins except Meta Box, MB AIO then the relationship posts display as well on the frontend.
Peter
ModeratorHmm, I do not see any issue with the provided information. Please share your site credentials via this contact form https://metabox.io/contact/
and let me know where I can see the issue on your site.Peter
ModeratorHello,
I import the shared JSON file to my local host, assign it to a post type, create a new post and add some value to the custom fields but do not see any issue.
You can try to delete some choice fields in the field group on your site like checkbox, radio, taxonomy ... and check this issue again.
Peter
ModeratorHello,
I do not see the relationship ID in the screenshot, can you please take a full screenshot?
April 21, 2023 at 6:19 PM in reply to: Using Meta Box Field to Restrict Content to Logged-in Users #41576Peter
ModeratorHello Bret,
I suggest you can try to add all arguments to the helper function
rwmb_meta(), for example:rwmb_meta( 'privacy', '', 123 );where 123 is the attachment ID. Because the helper function is not executed in a loop so you need to add the post ID to the third argument.
Or you can try to use the function
get_post_meta()if the code is executed earlier than theinithook with priority 20.Please read more on the documentation
https://docs.metabox.io/functions/rwmb-meta/
https://developer.wordpress.org/reference/functions/get_post_meta/Peter
ModeratorHello,
Please share a screenshot of the relationship settings or generate the PHP code and paste it here, I will check if there is an issue with the settings.
You may try to change the relation parameterfromtotoand add a specific post ID instead offilmmaker.IDto see how it works.Peter
ModeratorHello,
I do not see any issue with that relationship settings. Please share your site credentials via this contact form https://metabox.io/contact/ and let me know where I can see the issue. I will take a closer look.
Peter
ModeratorHello,
You are talking about the form not saving data, I see the data is still saved as well. Now you say the value does not display on the frontend. It depends on the code that you output the value.
I see one issue is: the field ID when creating the field group has the prefix
cohowhile the field ID in the View template on your site does not. That is why the code to get the field value is not working.Peter
ModeratorHello,
I got the issue. There is a group that has the same ID as the field post content, standard of WordPress, that causes the issue:
content
I change the group ID tocontent_1then save the post and field values properly.Peter
ModeratorHello,
Somehow the pastebin link does not work on my side. Can you please upload it to another hosting and share the URL here?
-
AuthorPosts