Forum Replies Created
-
AuthorPosts
-
February 25, 2022 at 9:13 AM in reply to: Admin field values not displaying on the admin model edit screen #34124
Long Nguyen
ModeratorHi,
Can you please share the code that creates models on your site? I do not see that on my end.
Long Nguyen
ModeratorHi,
Thanks for your feedback.
MB Frontend Submission does not work with the custom model. I will inform the development team to explore the possibility.
Long Nguyen
ModeratorHi Yasmine,
If you want to update the post title by the field
Research Titlevalue, here is the code:add_action( 'rwmb_research-summary_after_save_post', 'update_post_title' ); function update_post_title( $post_id ) { // Get the field value $my_meta = rwmb_meta( 'academicpost_title', '', $post_id ); //include the $prefix academic to the field ID // Preprare update post $my_post = array( 'ID' => $post_id, 'post_title' => $my_meta, ); wp_update_post( $my_post ); }February 24, 2022 at 10:20 PM in reply to: ✅Profile picture not showing in elementor template #34114Long Nguyen
ModeratorHi,
You can refer to this post https://support.metabox.io/topic/metabox-user-avatar-not-working-with-elementor-author-widget/#post-24660
to show the avatar in Elementor builder. Just change the field idmbua_avatarto your field IDprofile_picture.February 24, 2022 at 10:13 PM in reply to: Order the data by ASC or DESC in settings page inside views #34113Long Nguyen
ModeratorHi Kirb,
There is no way to order the images of the field
image_advancedlike the post. You can try to drag and drop the images in the field to re-order them as you want.Long Nguyen
ModeratorHi,
There is no change of the field type
taxonomyortaxonomy_advanced. The feature that supports creating a new term when creating/editing the post still works as well. It is possible that there was an issue on your site in a while.Long Nguyen
ModeratorHi,
Firstly, please share the code that creates the custom fields on your site. If you are using the builder, please read more here https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
Then I will help you to add the code to the template of the theme to show the image on the archive page.
The code on your post is to show the image of the category on the single post page, not on the archive page.
Please notice that, if you use the Oxygen Builder, it will ignore loading theme files.
Long Nguyen
ModeratorHi,
You also need to register a custom field with ID
post_contentto change the type. Refer to this documentation https://docs.metabox.io/extensions/mb-frontend-submission/#reorder-post-fieldsLong Nguyen
ModeratorHi,
I'm not sure about the benefit when you add the username/user ID to the URL of the post. You can try to create a relationship between posts and users then set up the connection as well. For the set of posts, you can use the custom taxonomy to group the posts that are connected to a user. I think it would be easier to implement the code.
Another way, you can create a post on Facebook to ask for another solution for your case.
https://www.facebook.com/groups/metaboxusersLong Nguyen
ModeratorHi,
If you want to display the field
imageof the taxonomy category, please follow this documentation https://docs.metabox.io/extensions/mb-term-meta/#getting-field-valueIn 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://support.metabox.io/topic/support-policy/Long Nguyen
ModeratorHi Cees,
Yes, it is possible. You can use the filter
rwmb_normalize_{$field_id}_fieldto change the type of a field on the frontend. Here is an example code:add_filter( 'rwmb_normalize_wysiwyg_field', function( $field ) { if( !is_admin() ) $field['type'] = 'textarea'; return $field; });Read more on the documentation https://docs.metabox.io/filters/#rwmb_normalize_field
Long Nguyen
ModeratorHi,
You can follow this topic to know how to output the field URL with a button https://support.metabox.io/topic/using-url-field-type/
Long Nguyen
ModeratorHi,
From the new version 4.0.0, MB Frontend Submission uses table
wp_optionsto store form config and errors with the option keymbfs_key. Please check the frontend form on your site if it has this hidden field https://monosnap.com/file/M01XVOw9JKsR1ZGxlOTPgPOtWuwQ5nOr you can share your page URL, I will help you to check it.
Long Nguyen
ModeratorHi,
Please try again with this one
{% set value = 'a' %} {% set checkbox_list = mb.rwmb_meta('checkbox_list') %} {% if value in checkbox_list %} Checked! {% else %} UnChecked! {% endif %}I've fixed the code a little bit. Using the helper function
rwmb_meta()to get the raw value of the fieldcheckbox_list.Long Nguyen
ModeratorHi,
I think it would be easier if you use the WP function
get_the_permalink()to get the full permalink (string) of the post. Then use the PHP functionstrpos()to check if a string is available in the permalink string. For example:{% set user_string = 'username' %} {% set args = { post_type: 'post', order: 'asc' } %} {% set posts = mb.get_posts( args ) %} {% for post in posts %} {% set permalink = mb.get_the_permalink( post.ID ) %} {% set pos = mb.strpos( permalink, user_string ) %} {% if pos %} {{ permalink }} <br> {% endif %} {% endfor %}Read more on the documentation
https://developer.wordpress.org/reference/functions/get_permalink/
https://www.php.net/manual/en/function.strpos.php -
AuthorPosts