Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Warren,
You can try to get the connected post (parent project) based on the post ID (project entry) in the callback function. And redirect to the connected post by ID.
Something like:
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { if ( 'my-meta-box' === $config['id'] ) { $pages = MB_Relationships_API::get_connected( [ 'id' => 'project-entries_to_projects', 'from' => $post_id, ] ); $p = reset( $pages ); wp_safe_redirect( get_the_permalink( $p->ID ) ); die; } }, 10, 2 );Read more on the documentation https://docs.metabox.io/extensions/mb-relationships/#getting-connected-items
https://docs.metabox.io/extensions/mb-frontend-submission/#form-hooksMay 22, 2022 at 10:11 PM in reply to: ✅How does MB Avatar Plugin enable the front end user to upload his avatar? #36126Long Nguyen
ModeratorHi Eddy,
The solution MB User Avatar works like the steps in this article https://metabox.io/create-custom-avatar/
You can create your own custom field and update the user avatar by the field
single_imagewith code. Then if you want to include the field on the frontend with the user profile shortcode, you can add the field group ID to that shortcode.
https://docs.metabox.io/extensions/mb-user-profile/#edit-profile-formLong Nguyen
ModeratorHi,
In your overridden function
normalize(), I think you need to return$fieldfor all return statements, don't return void/empty value.
See here https://github.com/wpmetabox/meta-box/blob/master/inc/fields/checkbox-list.php#L22Long Nguyen
ModeratorHi,
In case of using Oxygen Builder, please reach out to them if you have any issues with installation, configuration, compatibility, or usage.
Refer to our support policy https://metabox.io/support/topic/support-policy/Long Nguyen
ModeratorHi Phil,
Thanks for your feedback.
Does the issue still happen? There should be a temporary issue on our server.
Long Nguyen
ModeratorHi,
You can follow the documentation to create a custom query to get all posts of a CPT and custom fields associated with each post.
https://developer.wordpress.org/reference/classes/wp_query/#post-type-parameters
https://docs.metabox.io/fields/image-advanced/#template-usageFor example:
<?php $args = array( 'post_type' => array( 'photo' ) ); // The Query $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) { echo '<ul>'; while ( $the_query->have_posts() ) { $the_query->the_post(); echo '<li>' . get_the_title() . '</li>'; $images = rwmb_meta( 'my_field_id', ['size' => 'thumbnail'], get_the_ID() ); ?> <h3>Uploaded images</h3> <ul> <?php foreach ( $images as $image ) : ?> <li><img src="<?= $image['url']; ?>"></li> <?php endforeach ?> </ul> <?php } echo '</ul>'; } else { // no posts found } /* Restore original Post Data */ wp_reset_postdata();Long Nguyen
ModeratorHi,
Can you please share a screen record of the issue? If you do not edit a custom field, will the content be deleted?
May 20, 2022 at 9:23 PM in reply to: ✅Image advanced field in groups are only shown in a Thumbnail size #36103Long Nguyen
ModeratorHi guys,
This is how the Oxygen gets and displays the image from the group on their side. You need to contact Oxygen support to ask for help with this case.
May 20, 2022 at 9:20 PM in reply to: Account page is messed up, can't retrieve my license keys #36102Long Nguyen
ModeratorHi,
Can you please re-check this issue? I do not see that when accessing my account page.
Long Nguyen
ModeratorHi Jim,
If you use the code
post.exh_state, it will return an array of a value and a label of the select field. You can use this code to output the value or label.{{ post.exh_state.value }}
{{ post.exh_state.label }}Long Nguyen
ModeratorHi,
It is beyond the scope of support of Meta Box, it does not work with the WooCommerce checkout form on the frontend. You can follow this documentation to know how to add custom fields to Woo checkout form https://woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
Long Nguyen
ModeratorHi Kadota,
If the helper function is called outside the loop, you need to pass the post (product) ID to get the field value.
For example:
$amount = rwmb_meta( 'extra_fee', '', 123 );
where 123 is the product ID.Read more on this documentation https://docs.metabox.io/functions/rwmb-meta/
Long Nguyen
ModeratorHi,
There are two variables
postin a loop so it might not work. You can change the second variableposttopost2, for example, and re-check this issue.{% for post in posts %} {% set relationship = attribute( relationships, 'term-to-module' ) %} {% for post2 in relationship.to %} title {% endfor %} {{ post.title }} {% endfor %}Long Nguyen
ModeratorHi Nick,
Meta Box does not support cloning the frontend form of MB Frontend Submission. You can do something when cloning custom fields with the trigger events. Please read more here https://github.com/wpmetabox/meta-box/blob/master/js/clone.js#L122-L151
May 19, 2022 at 11:20 AM in reply to: Backend - Enter text to Form- predef Page duplication-Fields shows Formtext #36083Long Nguyen
ModeratorHi,
Thank you for reaching out.
Just to clarify that, Meta Box and MB extensions help you to create custom fields in the backend (or frontend with Frontend Submission form) and you need to create your own templates to output the field value and post type in the frontend.
Please read more on this documentation https://docs.metabox.io/custom-fields/
and follow our guide articles https://metabox.io/category/guide/case-study/ -
AuthorPosts