Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
I'm using WPML to translate the custom field label as well. What's the plugin that you use to translate it? Or there is a duplicate meta box with custom field labels.
Long Nguyen
ModeratorHi Kyle,
If you do not pass the post ID to the function
get_post(), it only works only on the frontend.null, false, 0 and other PHP falsey values return the current global post inside the loopPlease read more on the documentation https://developer.wordpress.org/reference/functions/get_post/
The Render Code area in the Builder supports to get the current post ID by using the variable
post_id. For example:{% set post = mb.get_post( post_id ) %} {{ post.product_name }}List of prebuilt variables can be used:
attributeBlock attribute. Replace attribute with anchor, align, or className.
field_idField value. Replace field_id with a real field ID.
is_previewWhether in preview mode.
post_idCurrent post ID.Long Nguyen
ModeratorHi,
I do not see any issue when translating the field name to another language. You might need to change the text domain
text-domainto your theme or plugin text domain.Screen record https://share.getcloudapp.com/mXuP8DAm
(using WPML)Long Nguyen
ModeratorHi,
There is no tutorial on how to do it with coding. I will inform our team to create a blog post for this case.
Long Nguyen
ModeratorHi,
You can get the post ID dynamically in the loop by using the WordPress function get_the_ID(). Screen record for demo https://share.getcloudapp.com/DOu6nlRq
Code:
<?php echo '<a href="http://siteurl.com/frontend-submit-page-slug/?rwmb_frontend_field_post_id=' . get_the_ID() . '">Edit post 12345</a>'; ?>Theme: Twenty TwentyOne, file archive.php
https://github.com/WordPress/twentytwentyone/blob/trunk/archive.php#L26-L29Long Nguyen
ModeratorHi,
Create a search form that searches data from the custom table is more complicated. You can use the plugin SearchWP to do that. Please read more here https://metabox.io/plugins/meta-box-searchwp-integrator/
Long Nguyen
ModeratorIt looks like the same issue here https://support.metabox.io/topic/php-error-trim-argument-1-string/
I will close this topic.Long Nguyen
ModeratorHi,
That means the argument pass to the function
trim()is not a string, maybe an array. Can you please share some screenshots of the View code and the custom fields that you pass its value to the functiontrim()?Please read more on the documentation https://www.php.net/manual/en/function.trim.php
October 8, 2021 at 10:28 AM in reply to: ✅Show "last update" instead of "date" on user dashboard #31230Long Nguyen
ModeratorHi Ole,
You can replace your date format with the variable
$formatin the code above$time = get_the_modified_time( 'M j, Y' );Long Nguyen
ModeratorHi,
Thanks for your feedback.
I will collect and forward them to the development team to improve the extension.
October 8, 2021 at 9:55 AM in reply to: Linking between gravity forms registration and custom user meta #31226Long Nguyen
ModeratorHi,
Does the GF registration addon support register and save the image field? If yes, you can contact them to ask for the data type they expect to save to the database. I see on this topic
https://support.metabox.io/topic/gravity-forms-submissions-not-updating-user-meta/
the addon supports thetextfield on the registration form only.Long Nguyen
ModeratorHi,
Yes, it can work with MB CPT and custom fields as well. You can read an article of us about the same query https://metabox.io/get-posts-by-custom-fields-in-wordpress/
October 8, 2021 at 9:21 AM in reply to: ✅On update, custom fields group reverts by itself to standard post type. #31223Long Nguyen
ModeratorHi,
Thanks for your sharing.
I'm not sure what happens with that field group. I've created another field group and assign it to the post-type Activity as well.
I also exported this field group and import it to my demo site and assign it to a CPT, add more fields without any issue.
So please try to create a new field group with the same custom fields and assign it to the Activity post type.
Long Nguyen
ModeratorHi,
Thanks for the additional information.
It looks like the Avada theme does not support populating images from the custom field. You can try to contact Avada theme to ask for supporting this case.
Or use a tricky way, remove the post type support
Thumbnail, then change the field IDsingle_image_asdfto this ID_thumbnail_id. You can still select the Featured image in the Avada dropdown but it will show the image of the custom field.Long Nguyen
ModeratorHi Toni,
Please share the code that creates the field Data RDO and turn on WP_DEBUG to check the error log when you get the blank screen. Get more details here https://support.metabox.io/topic/how-to-create-a-new-topic/
-
AuthorPosts