Forum Replies Created
-
AuthorPosts
-
November 8, 2023 at 6:25 PM in reply to: how to copy the php of settings pages, custom post types and custom fields #43770
Peter
ModeratorHello,
With the custom fields and custom post types, you can use the free version of Meta Box. With the settings page, if you use the code, you still need to have the plugin MB Settings Page activated. Following the documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
And currently, it isn't possible to have a Lifetime license for 1 site only.
November 8, 2023 at 3:50 PM in reply to: ✅Call of /wp-admin/user-edit.php leads to Fatal error #43769Peter
ModeratorHello,
Thanks for your details. It happens with PHP 8+ version. I will inform the development team to improve this case in future updates.
Peter
ModeratorHello,
The field group looks corrupted, the
fieldsproperty in the JSON file is empty. I also import the JSON file to my demo site and do not see any fields. You can try to re-create the fields with the same IDs to continue managing them.How would this be possible ?
I'm not sure. But there is a case that you click on the Update button in the field group, while the fields are loading and not displayed and you click on the Update button again, all fields will lost.is there a way to regenerate from the database setup?
If you have a backup file from the point before the issue occurs, you can try to restore it.November 7, 2023 at 10:14 PM in reply to: ✅Call of /wp-admin/user-edit.php leads to Fatal error #43762Peter
ModeratorHello Aaron,
Can you please check the edited user role setting? If it is empty (or null), please assign it to a user role and recheck this issue.
November 7, 2023 at 9:56 PM in reply to: ✅How to show the number of published posts of a post type? #43760Peter
ModeratorHello,
That function returns an object so it's not possible to output an object. You can output its property, like this:
{% set post_count = mb.wp_count_posts ( 'video' ) %} {{ post_count.publish }}Following the documentation https://developer.wordpress.org/reference/functions/wp_count_posts/
Peter
ModeratorHello,
I've asked you to share the login link but not received any reply. You shared the user and password without the login link.
November 7, 2023 at 9:18 PM in reply to: Displaying connected content on post archive not working anymore #43758Peter
ModeratorHello,
I also test the static function
each_connected()on my demo site and see it does not work. Please use the functionget_connected()to fix this issue. Following the documentation
https://docs.metabox.io/extensions/mb-relationships/#getting-connected-itemsNovember 7, 2023 at 8:45 PM in reply to: ✅Some Custom Fields Not Saving after WP/MB Update (not max_input_vars issue) #43756Peter
ModeratorHello Brandon,
What are custom fields that stop saving value on your site? If I remove the revision setting and increase PHP settings
max_input_varsto 500k and I can save field value as well.Peter
ModeratorThanks for your feedback.
I've forwarded it to the development team to consider supporting a filter hook for the submit button form in the user profile forms.
Peter
ModeratorHello,
There are two JS validation rules for image/file field: extension and accept, but not image/file size. Please read more in the documentation https://docs.metabox.io/validation/#advanced-validation
For the image size, please follow the suggested above.
Peter
ModeratorHello Jackky,
Do you mean some HTML entities are converted to single characters? For example:
& ;- &
Then the sanitization does not work as expected.Peter
ModeratorHello,
You can try to use the function
get_post_meta()to get a custom field of a post if it exists. Following the documentation
https://developer.wordpress.org/reference/functions/get_post_meta/
https://wordpress.stackexchange.com/questions/165756/show-custom-field-if-it-exists-and-show-different-elements-if-it-doesntPeter
ModeratorHello,
I add the code above to your site https://support.metabox.io/topic/meta-query-elementor/?swcfpc=1#post-43704
and see it works correctly. The logic here is: show the posts if the end date or start date is greater than the current date. It's an example of using two conditions.If it is not your logic, you can follow the WordPress documentation to create your own code.
https://developer.wordpress.org/reference/classes/wp_query/#custom-field-post-meta-parametersPeter
ModeratorHello,
In the frontend, before submitting a post, the post ID is not created so it won't work as your requirement. I think you can create a custom PHP code to check if the file is not located in a post ID folder, then create a post ID folder and move the file there.
Peter
ModeratorHello Yasmine,
Do you use the validation of Meta Box as in the documentation? I don't see that in your code.
https://docs.metabox.io/validation/Also, supporting a customization code (second button) for your specific needs is beyond our scope. You can submit a customization request via the contact form below, our development team will help you with an extra fee.
https://metabox.io/contact/ -
AuthorPosts