Forum Replies Created
-
AuthorPosts
-
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/Peter
ModeratorHello Yasmine,
If you want to show the child item when selecting the parent item, please use the field type
select_tree.November 2, 2023 at 9:52 PM in reply to: ✅what is the scope parameter of rwmb.runConditionalLogic() for? #43721Peter
ModeratorHello,
I'm discussing this with the development team to give more examples of this function. I will get back to you later.
Peter
ModeratorHello,
As I mentioned above, the remote validation only supports validating a single field only. It does not validate by comparing two field values. You can create your own JS code to compare two or more field values.
The sanitization doesn't notify the user after processing the value but you can access all subfield values with this feature.
Peter
ModeratorHello,
I suggest you use the Inspect tool of the browser to check the HTML structure and create a correct CSS code https://developer.chrome.com/docs/devtools/open/
If you want to target the label of custom HTML field, you can try this CSS selector:
.rwmb-custom_html-wrapper label { ... }November 1, 2023 at 10:11 PM in reply to: ✅View from relationship, one side not displaying anything #43715Peter
ModeratorHello,
On the Award post, please change the relation side to
to, like this'relationship': { 'id': 'proyectos-y-premios', 'to': post.ID, }that means get Project posts related
tothis Award post.Peter
ModeratorHello,
We use the validation JS to validate the input value from the user. The group field works as a wrapper field and there isn't an input for this field. Also, it isn't possible to compare two current field values when submitting. It only takes one field value and sends it to the Ajax per field.
If you want to compare two fields when submitting, please take a look at the Sanitization feature https://docs.metabox.io/sanitization/
Peter
ModeratorHello Bryan,
When enabling the HPOS feature, the order page works like a settings page and the data is synced to the custom table of WooCommerce so the field group won't display there. I will inform the development team to consider supporting this feature in future updates.
Peter
ModeratorHello,
Please share your site credentials via this contact form https://metabox.io/contact/
I will take a closer look.Peter
ModeratorI'm sorry about that but I cannot check if the MB conditional logic works with all custom code you made on your site, it is beyond our scope of support.
To reproduce the issue, please just create some simple fields and test it on the same page without the custom code as I mentioned above https://support.metabox.io/topic/conditional-logic/?swcfpc=1#post-43678Peter
ModeratorHello Joe,
Do you use a taxonomy field for the CPT "reps" on the same editing page? Also, please try to deactivate all plugins except Meta Box, MB extension plugins, switch to another theme and recheck this issue.
Peter
ModeratorHello,
It depends on your compare operator in the meta query. You can change the operator to greater like this:
'key' => 'slut_dato', 'value' => date( 'Y-m-d', current_time( 'timestamp' ) ), 'compare' => '>=',Also, I see it works with the date format
Y-m-d -
AuthorPosts