Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi David,
Elementor does not support adding the shortcode to the "Link" box of the Icon List widget so using helper shortcode will not work. You can try to contact Elementor support to ask for help with this case.
Long Nguyen
ModeratorHi,
It is not possible to save order meta in the custom table. It's just an example of too many rows that are saved into the database of WooCommerce order.
October 22, 2021 at 12:40 PM in reply to: Filter contents of 1 Dropdown with value from another dropdown. #31449Long Nguyen
ModeratorHi,
Yes, you can create a CPT
makewith some parent postsBMW, Chevy, Chrysler, Dodge, Fordand child posts. Then use the fieldpostwith the field typeselect_treeorcheckbox_tree. Screenshot https://share.getcloudapp.com/rRuWLe2eThe setting
parentor "Set as parent" in the builder is to set the selected post in the box as the parent of the current edited post.
https://docs.metabox.io/fields/post/#settingsLong Nguyen
ModeratorHi John,
You can try to use the frontend form filter
rwmb_frontend_insert_post_datato modify the post data, please follow this reply https://support.metabox.io/topic/dashboard-for-logged-in-user/#post-31387
and the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#post-data-filtersOctober 21, 2021 at 10:46 PM in reply to: How to retrieve an existing Custom Post Type in Metabox #31438Long Nguyen
ModeratorHi Johan,
Please follow this article https://metabox.io/move-custom-post-type-custom-field-data-from-pods-to-meta-box/
to move CPTs and taxonomies from a third-party plugin to Meta Box.Long Nguyen
ModeratorHi,
If you want to show the list of posts of the user submitted from the frontend submission page, you can create the frontend dashboard to show them. Please get more details on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#user-posts-dashboard
If you want to use the View shortcode to render the code anywhere, please set the Type to Shortcode, screenshot https://share.getcloudapp.com/mXuPm6L0
Then put the shortcode to the page that you want to show CPT.Long Nguyen
ModeratorHi Rebecca,
You need to put the function
get_terms()in the loop that queries Destinations posts. For example$query_destinations = new WP_query( array( 'post_type' => 'destinations', ) ); while( $query_destinations->have_posts() ) { $query_destinations->the_post(); echo get_the_title(); $terms = get_terms( [ 'taxonomy' => 'state', 'hide_empty' => false, 'relationship' => [ 'id' => 'from_destination_to_state_tax', 'from' => get_the_ID(), // You can change from or to based on the relationship ], ] ); foreach ( $terms as $term ) { echo $term->slug . ' - ' . $term->count . " Related Posts"; } }Long Nguyen
ModeratorHi,
I have some useful information from the developer team:
The problem happens due to some fields' values are saved into the database as object ID (image, file, post ...) and they are saved to the main site of the network to avoid duplicate object ID.
So we need to switch to the main site to get the field value, here is the sample code https://pastebin.com/txYEyDvc
Long Nguyen
ModeratorHi,
The attribute
readonlydoes not work with the fieldradio. You can set the default value and disable the radio field.[ 'name' => __( 'Radio', 'your-text-domain' ), 'id' => $prefix . 'radio', 'type' => 'radio', 'options' => [ 'a' => __( 'A', 'your-text-domain' ), 'b' => __( 'B', 'your-text-domain' ), 'c' => __( 'C', 'your-text-domain' ), ], 'std' => 'b', 'disabled' => true, ],Long Nguyen
ModeratorResolved in the new version 2.2.5 of MB Custom Post Type.
Long Nguyen
ModeratorHi,
To get the field value in the block, you can use the helper function
mb_get_block_field(). In this case, it will return a term object and you should add the argumentfieldto thetax_queryarray. The code should be$books = mb_get_block_field( 'taxonomy_books'); $queryBooks = new WP_query(array( 'posts_per_page' => -1, 'post_type' => 'books', 'tax_query' => array( array ( 'taxonomy' => 'book', 'terms' => $books->term_id, 'field' => 'term_id', //optinal, default is term_id, just for declaration ) ), ));Get more details on the documentation
https://docs.metabox.io/extensions/mb-blocks/#render_callback
https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parametersOctober 20, 2021 at 1:05 PM in reply to: Filter contents of 1 Dropdown with value from another dropdown. #31407Long Nguyen
ModeratorHi Jeremy,
The post or taxonomy field does not support getting the value from a field as an argument on live click. You need to create a custom field type and add some JavaScript code to do that.
https://docs.metabox.io/custom-field-type/Long Nguyen
ModeratorYes, it is possible. You can add args to the shortcode as the attributes, like this
[rwmb_meta id="map_field_id" zoom="5"]Note: you can pass other attributes to the shortcode if you want. If you do so, those attributes will be passed to rwmb_the_value() function as the 2nd parameter.
Long Nguyen
ModeratorHi,
But there is no connection between a
single-statepost and a term ofstatetaxonomy. You can try to use the extension MB Relationships to create a connection betweensingle-stateCPT andstatetaxonomy.Then on the
single-statepost, you can get the relationstateterm and count the postdestinationassociated.Read more on the documentation https://docs.metabox.io/extensions/mb-relationships/#terms
October 19, 2021 at 11:00 PM in reply to: submission from frontend form including 2 custom fields groups #31400Long Nguyen
ModeratorHi,
Yes, it is possible. You can add more field group (meta box) IDs to the frontend submission shortcode and separate them by commas. For example
[mb_frontend_form id="meta-box-id1,meta-box-id2,meta-box-id3" post_fields="title,content"]Refer to the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributes
-
AuthorPosts