Forum Replies Created
-
AuthorPosts
-
January 24, 2024 at 9:22 PM in reply to: ✅Add Dropdown select of saved data using functions.php #44378
Peter
ModeratorHello,
If you use the simplified version
function populate_my_select_field() { return [ 'option1' => 'Option 1', 'option2' => 'Option 2', ]; }then the field still doesn't save value. Please check if the setting
Save field valueis enabled, screenshot https://imgur.com/rdIYYyyPeter
ModeratorHello,
You need to import the
osmfield value to the database in order to display the address. It should be lat,lng,zoom. Following the documentation https://docs.metabox.io/fields/osm/Peter
ModeratorHello Duffl,
In this case, you will need to use a custom code to rewrite the permalink. It is an issue with the conflict slug of WordPress rather than a Meta Box issue.
You can read more on some links below. If it doesn't help, I recommend using a different CPT slug to prevent this issue.
https://wordpress.stackexchange.com/questions/135146/resolve-a-custom-post-type-name-vs-page-permalink-conflict-same-slug
https://wordpress.org/support/topic/custom-post-type-and-page-same-slug/January 23, 2024 at 11:24 PM in reply to: How to add Custom fields only to certain categories? #44372Peter
ModeratorHello,
You can use the Advanced Location Rules (MB Include Exclude), however it supports loading a field group for a specific post based on the condition as in the documentation https://docs.metabox.io/extensions/meta-box-include-exclude/
not for a specific term as you mention. I will inform the development team to consider supporting this feature in future updates.Thanks.
January 23, 2024 at 10:56 PM in reply to: Remote validation for uniquenes - how to prevent when editing existing post? #44370Peter
ModeratorHello Phil,
1. Currently, there is an issue with the remote validation and I cannot check if the post ID will work in this case.
2. Yes, it may be a good approach. You can use that action hook and get the post ID via the global variable $_POST.
3. No, the custom validation message in the builder works properly.
Peter
ModeratorHello Skauer,
The relationship isn't a custom field, its data doesn't save to the default table
wp_postmeta, it is saved to a custom tablewp_mb_relationships.
To get and display the relation posts, you need to use the code, following the documentation https://docs.metabox.io/extensions/mb-relationships/January 20, 2024 at 10:38 PM in reply to: ✅MB jQuery Validation - Scroll To Highlight Error - WYSIWYG Issue #44357Peter
ModeratorHello,
Thanks for sharing the workaround. I've escalated the issue to the development team to improve the scrollable feature for this field in future updates.
January 20, 2024 at 2:00 PM in reply to: ✅Show the Frontend Custom User Profile Image - within MB Admin Columns #44356Peter
ModeratorHello,
Here is an example:
add_filter( 'rwmb_the_value', function( $output, $field, $args, $object_id ) { if( is_admin() && $field['id'] == 'file_upload_id') { $file_value = rwmb_meta( 'file_upload_id', $args, $object_id ); if( !empty( $file_value ) ) { $file_value = array_pop( $file_value ); $output = '<img src="'. $file_value['url'] .'" alt="File image" width="32" height="32">'; } } return $output; }, 11, 4 );Peter
ModeratorHello,
I'm asking the development team to check the compatibility with Polylang and we will create documentation for this plugin. Thank you.
January 19, 2024 at 5:33 PM in reply to: ✅Taxonomy appears to save on CPT, but turns up empty on the back-end archive #44352Peter
ModeratorHello,
You can use this plugin to switch taxonomy for terms https://wordpress.org/plugins/taxonomy-switcher/
Peter
Moderator@DustinD: Your issue looks different from other ones. The fields are removed from the field group. You may double-click on the Update button of the field group and the fields are lost. If the issue happens with other field groups, please share your site credentials here https://metabox.io/contact/
I will take a look.
Note: we do not support older versions of MB plugins.@Kara: Please try to bypass the sanitization of the field and add only text to the field, save the post and check the issue again. Following the documentation https://docs.metabox.io/sanitization/
January 18, 2024 at 11:15 PM in reply to: ✅Show the Frontend Custom User Profile Image - within MB Admin Columns #44343Peter
ModeratorHello,
I see you have a similar question in the past https://support.metabox.io/topic/add-fallback-image-when-there-is-no-featured-image/
You can modify the admin column of the file_upload field with the filter hookrwmb_the_valueto display the image instead of using a custom admin column.January 18, 2024 at 11:00 PM in reply to: ✅datepicker not being translated when using mb_frontend_form #44341Peter
ModeratorHello,
What is the translation plugin you use to translate the text? I use WPML to translate it and it works as well on my demo site.
January 18, 2024 at 10:26 PM in reply to: ✅Display MB View shortcode in an Elementor loop template #44339Peter
ModeratorHello,
It is possible to use MB View shortcode to get the relationship of the post, add the View shortcode to the loop item and show related posts. You can use the WordPress function
get_the_ID()to get the post ID of the current post in the loop. Then get the relationship based on the post ID.For example: I have a relationship between 2 CPT: from Post to My Job, relationship ID
post-to-joband I'm using the Elementor widget Loop Grid to show a list of posts and related job posts. The sample View code:{% set current_post_id = mb.get_the_ID() %} {% set args = { post_type: 'my-job', relationship: { id: 'post-to-job', from: current_post_id } } %} {% set job_posts = mb.get_posts( args ) %} {% for job_post in job_posts %} Related Job: {{ job_post.post_title }} <br /> {% endfor %}Peter
ModeratorHello Brent,
In your case, Meta Box helps you to create custom post types and you can create more articles under that post type, like the Post of WordPress. You will need to use other plugins or custom code to show them in the frontend, search, filter, optimization ...
Instead of creating everything from scratch, you can use some Knowledge Base plugins and focus only on building content, output arciles in the fronted is easier.
https://www.wpbeginner.com/showcase/best-knowledge-base-plugins-for-wordpress-compared/ -
AuthorPosts