Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
The field
taxonomydoesn’t store any terms in the post meta. Instead, it sets post terms. Just like a replacement of Category or Tag meta box of WordPress so it does not work with Group or Block. If you want to save the taxonomy as the post meta or Block content, please use the fieldtaxonomy_advanced.For more information, please follow these documentations.
https://docs.metabox.io/fields/taxonomy-advanced/
https://docs.metabox.io/fields/taxonomy/#dataLong Nguyen
ModeratorThanks for sharing the solution.
Long Nguyen
ModeratorHi Jose,
Would you mind telling us what doesn’t work for you? If you have any feedback, suggestions for us, we would love to hear that.
Thanks.
October 15, 2021 at 9:16 PM in reply to: MB Frontend Dashboard not showing all submitted psot #31337Long Nguyen
ModeratorHi Dragos,
Yes, there is a way. But you need to have knowledge about coding to customize the frontend dashboard shortcode. Please refer to this topic https://support.metabox.io/topic/duplicate-dashboard-shortcode/
Long Nguyen
ModeratorHi Wojtek,
Yes, it is possible to set the automatic relationship between the post submitted with the current page. Use this code to create a connection after submitting the form.
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { MB_Relationships_API::add( get_queried_object_id(), $post_id, 'your-relationship-ID', $order_from = 1, $order_to = 1 ); }, 10, 2 );Refer to this topic https://support.metabox.io/topic/prepopulate-relationship-field-with-current-post-id/
Both Fluent Forms and MB Frontend Submission support submitting a post from frontend so I think you should use one.
Long Nguyen
ModeratorHi,
If you have more admin columns for other fields, you can add the condition to show for a specific field as well.
add_filter( 'rwmb_the_value', function( $output, $field, $args, $object_id ) { $value = rwmb_meta( 'date_picker', $args, $object_id ); if( is_admin() && $field['id'] == 'date_picker') { $output = date( 'd F, Y', strtotime( $value ) ); } return $output; }, 11, 4 );Get the field settings from the variable
$fields
https://docs.metabox.io/field-settings/#generalLong Nguyen
ModeratorHi,
Currently, it's not possible but it's an interesting idea. Thank you.
I will inform the development team to consider supporting this feature quest in future updates.October 14, 2021 at 8:35 PM in reply to: MB Frontend Dashboard not showing all submitted psot #31322Long Nguyen
ModeratorHi Dragos,
You are right. The frontend dashboard only supports showing/editing the posts of the current user submitted. I will inform the development team to support a filter to modify the query of the dashboard.
Long Nguyen
ModeratorHi,
Please try to add this code above the class
use WP_Query; use WP_Error; use MetaBox\Support\Arr; class My_Dashboard { ... }I've re-checked the code and it works as well on my demo site.
Long Nguyen
ModeratorHi Mariano,
In your case, the code should be
add_action( 'rwmb_gruppo-campi-pazienti-orto_after_save_post', 'update_post_title' ); function update_post_title( $post_id ) { // Get the field value $my_meta = rwmb_meta( 'text_f71tmmr7ws', '', $post_id ); // Preprare update post $my_post = array( 'ID' => $post_id, 'post_title' => $my_meta, ); wp_update_post( $my_post ); }Let me know how it goes.
Long Nguyen
ModeratorHi,
To get the term meta, please follow this documentation
https://docs.metabox.io/extensions/mb-term-meta/#getting-field-value
https://docs.metabox.io/fields/single-image/#template-usageFor your case, the code should be:
... foreach( $states as $state ) { $image = rwmb_meta( 'state-thumbnail-image', ['object_type' => 'term'], $state->term_id ); echo '<img src='. $image['url'] .' />'; } ...Long Nguyen
ModeratorHi,
You can use the extension MB Term Meta to add custom fields to Genre taxonomy. The Builder also supports this extension https://share.getcloudapp.com/DOu6wqmJ
Read more on the documentation https://docs.metabox.io/extensions/mb-term-meta/
Long Nguyen
ModeratorHi,
The field ID (meta key) is associated with the post/page ID or option name (setting page) so it's not possible to use the same field ID in other places on a page.
You can try to use the
cloneablefeature to duplicate a field or a group.
https://docs.metabox.io/cloning-fields/Long Nguyen
ModeratorHi Ole,
All code from line 8 to the end
class Dashboard { ... }and you need to instantiate the class once. For example: You can add this code to the file functions.php https://pastebin.com/mZ5PCPhT
Then use the custom shortcode[custom_frontend_dashboard edit_page='12345']Long Nguyen
ModeratorHi,
The admin column uses the helper function
rwmb_the_valueto show the field value. You can use this filter hook to change the date format when showing on the backend. For example:add_filter( 'rwmb_the_value', function( $output, $field, $args, $object_id ) { $value = rwmb_meta( 'date_picker', $args, $object_id ); if( is_admin() ) { $output = date( 'd F, Y', strtotime( $value ) ); } return $output; }, 11, 4 );Admin column: https://share.getcloudapp.com/kpu6kg7g
Database: https://share.getcloudapp.com/BluDg9Y7Read more on the documentation https://docs.metabox.io/filters/#rwmb_the_value
-
AuthorPosts