Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Brent,
Please make sure that you have the correct post object in the loop. By default the post object when adding fields from Insert Field is
post, you should change it topresenter. For example{% for presenter in presenters %} <div> {{ mb.get_the_post_thumbnail( presenter, 'thumbnail' ) }} <h3>{{ presenter.post_title }}</h3> {{ presenter.url }} <img src="{{ presenter.thumbnail.thumbnail.url }}" width="{{ presenter.thumbnail.thumbnail.width }}" height="{{ presenter.thumbnail.thumbnail.height }}" alt="{{ presenter.thumbnail.thumbnail.alt }}"> </div> {% endfor %}Long Nguyen
ModeratorHi,
WordPress does not allow registering the taxonomy for the user like the post so the field
taxonomydoes not work with users. But you can try to use the fieldtaxonomy_advanced, it works like a user meta. Please get more details here https://docs.metabox.io/fields/taxonomy-advanced/Long Nguyen
ModeratorHi,
This issue has been fixed in the new version of MB Builder, MB AIO. You can remove the code in that commit, update the extension and re-check the issue.
June 10, 2022 at 12:30 PM in reply to: โ Use rwmb_show comparing user capability and post field #36421Long Nguyen
ModeratorHi Scott,
The filter hook
rwmb_show_{$meta_box_id}is applied to the field group (meta box), not to a field. And it is executed on load so it won't work if you select a field value to show it immediately.
You can try to use the extension MB Conditional Logic to show a field based on another field value. Please read more on the documentation https://docs.metabox.io/extensions/meta-box-conditional-logic/Long Nguyen
ModeratorHi Nick,
Yes, it is possible to embed a frontend form in an iframe tag. You can also refer to this documentation for more information https://docs.metabox.io/extensions/mb-frontend-submission/#embedding-forms-on-other-sites-via-iframe
June 10, 2022 at 10:57 AM in reply to: Use Image Upload field to set the Featured Image of the post #36419Long Nguyen
ModeratorHi Kara,
Can you please share the code that creates the field group
candidateon your site? And please make sure that the featured image is enabled for that CPT.The code above helps you to validate the field image upload to not empty, it does not help to set the featured image after submitting the form.
June 10, 2022 at 10:49 AM in reply to: Uncaught Error: Option 'ajax' is not allowed for Select2 #36418Long Nguyen
ModeratorHi,
I do not see that issue on my demo site with Meta Box, MB extensions and WooCommerce activated. You can try to deactivate all plugins except them and switch to the standard theme of WordPress (Twenty TwentyTwo) then re-check the issue.
Long Nguyen
ModeratorHi Chris,
There is no caching for relationships set up on the backend. Can you please share some screenshots before/after changing the order?
You can also access your database, open the tablewp_mb_relationshipsto see the order of the post (object). Read more on this documentation https://docs.metabox.io/extensions/mb-relationships/#databaseLong Nguyen
ModeratorHi,
You can try to use the action hook
rwmb_frontend_after_processto get the attachment URL (field value) based on the post ID and included in the email content. For example:add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { if ( 'my-meta-box' === $config['id'] ) { $files = rwmb_meta( 'my_field_id', '', $post_id ); wp_mail( '[email protected]', 'New submission', 'A new post has been just submitted.' . $files[0]['url'] ); //or change it to $files['url'] if you have only one attachment wp_safe_redirect( 'thank-you' ); die; } }, 10, 2 );Refer to the documentation https://docs.metabox.io/fields/file-upload/#template-usage
https://docs.metabox.io/extensions/mb-frontend-submission/#form-hooksLong Nguyen
ModeratorHi,
Thanks for sharing your solution. But I do not see it relates to the main issue, post content is empty.
Long Nguyen
ModeratorHi,
Can you please share the code that you are using to create the custom table and custom fields? And share your database info. Somehow in my demo site, I have to use the third parameter
$keyto save the data to the custom table.keys Array of key column IDs. These columns will be indexed. Optional.Long Nguyen
ModeratorHi,
Sorry for the late reply.
I see you've created another topic with the same question about the subfield value so I think it should be done on that topic https://support.metabox.io/topic/how-to-query-a-post-field-in-a-group/
To get the full powerful features of Meta Box, you should also have a basic knowledge of WordPress and PHP coding.Can you please let me know what's wrong with your posts?
Long Nguyen
ModeratorHi Brent,
In a custom query, you can use the post field items in the Insert Field tab to display the post URL, post content ... in a custom query. Please check this screenshot https://monosnap.com/file/NBke9ScHpdSk2Njp22dwYUu4ulWtRG
June 9, 2022 at 12:59 PM in reply to: Use Image Upload field to set the Featured Image of the post #36387Long Nguyen
ModeratorHi Kara,
I think there are two issues with your code.
The code
$config['_thumbnail_id']should be$config['id']to check the field group ID.The code
$_POST['image_upload_field']should be$_POST['_thumbnail_id']to check the field ID.Long Nguyen
ModeratorHi Chris,
Please make sure that the relationship between Ticket and Reply is registered. Refer to this documentation https://docs.metabox.io/extensions/mb-relationships/#using-code
-
AuthorPosts