Forum Replies Created
-
AuthorPosts
-
May 21, 2021 at 9:32 PM in reply to: ✅Frontend Submission persistent across pages (with PHP SESSION?) #28364
Long Nguyen
ModeratorHi Jordan,
The extension MB Frontend Submission does not support showing field value across pages. The multi-step forms on this topic might help you to achieve your goal https://support.metabox.io/topic/multi-step-forms/.
Long Nguyen
ModeratorHi Piero,
The custom table does not support saving field values in multiple rows like the default table
wp_postmeta. I will inform the development team to explore the possibility.Related topic https://support.metabox.io/topic/mb-custom-table-clone-field/
Long Nguyen
ModeratorHi David,
You can use the shortcode to show the field value stored in the custom table. See more on this documentation https://docs.metabox.io/shortcode/
Long Nguyen
ModeratorHi,
Yes, it still works when I remove/change the featured image of the product. Screen record https://share.getcloudapp.com/E0uYDeb6
It is possible that there is a conflict between plugins. You can try to follow the Debugging Information on the reply above to troubleshoot this issue.
Long Nguyen
ModeratorHi Piero,
Thank you for your feedback.
The field setting
clone_as_multipleonly works with the default WordPress tablewp_postmeta, not work with the custom table. I will inform the development team to explore the possibility.Long Nguyen
ModeratorHi Quint,
Thank you for reaching out.
You can follow this topic to know how to replace the post title by custom field value https://support.metabox.io/topic/adding-metabox-field-data-to-the-post-title/
And this documentation to get the field value in the custom table https://docs.metabox.io/extensions/mb-custom-table/
Let me know if it helped.
Long Nguyen
ModeratorHi Chris,
To get multiple post types for each term, you need to use the custom query.
$args = array( 'post_type' => array( 'product', 'event' ), 'tax_query' => array( array( 'taxonomy' => 'composer', 'field' => 'slug', 'terms' => 'johann-sebastian-bach', ), ), ); $query = new WP_Query( $args );See more on this documentation
https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters
https://wordpress.stackexchange.com/questions/103368/query-multiple-custom-post-types-in-single-loopTo show post types in View, you can use the function get_posts() via proxy
mb.For example:
{% set args = { post_type: ['product', 'event'], tax_query: [ { taxonomy: 'composer', field: 'slug', terms: 'johann-sebastian-bach' } ] } %} {% set my_posts = mb.get_posts( args ) %} {% for post in my_posts %} {{ post.post_title }}<br> {% endfor %}Long Nguyen
ModeratorHi Chris,
Did you add the attribute
post_typeto the frontend submit shortcode?[mb_frontend_form id="meta-box-id" post_fields="title,content" post_type="cpt-slug"]You can also share the two frontend shortcodes that you are using. I will help you to check them.
May 20, 2021 at 9:21 PM in reply to: ✅taxonomy field in MB Blocks - saved value disappears when clicking on block #28324Long Nguyen
ModeratorHi Gerda,
Thank you for getting in touch.
Please follow this topic https://support.metabox.io/topic/not-show-taxonomy-field-values-in-mb-blocks/
and let me know if it helped.Long Nguyen
ModeratorHi Filipe,
Use your code to create custom fields on the product editing page, I do not see any issue. Screen record https://share.getcloudapp.com/12uAGeAW.
Please follow the Debugging Information step here https://support.metabox.io/topic/how-to-create-a-new-topic/ to troubleshoot this issue. Let me know how it goes.
Long Nguyen
ModeratorHi Julian,
The option
save_formatdoes not work with the group field. On the other hand, using the group which means for store data, not querying so we don't need to save to another format. We've mentioned it here https://metabox.io/create-group-of-custom-fields-with-meta-box-group/May 20, 2021 at 9:09 AM in reply to: ✅Relationship CPT Title not Displaying using MB View Shortcode #28316Long Nguyen
ModeratorHi Shrini,
Let me explain this case.
If you use Insert Field and get the code
{% set relationship = attribute( relationships, 'candidate_party' ) %} {% for post in relationship.from %} {{ post.title }} {% endfor %}it will take the current post ID of the post that you insert the shortcode. The PHP code in the documentation has the same meaning
$pages = MB_Relationships_API::get_connected( [ 'id' => 'posts_to_pages', 'from' => get_the_ID(), //here ] ); foreach ( $pages as $p ) { echo $p->post_title; }So if you add the shortcode to a post/page that does not have the relationship, it will not show the connection title. You should change the Type to Singular and Post to post type Candidate to use the field in the Insert Fields list. Screenshot https://share.getcloudapp.com/Jru4K55B
Long Nguyen
ModeratorHi,
Thank you for your additional information.
I've escalated this issue to the development team to fix it in future updates.
Long Nguyen
ModeratorHi,
Thank you for getting in touch.
You can use the code to print the color picker value in Inline CSS. For example:
$value = rwmb_meta( 'color_picker' ); ?> <style> body { color: <?php echo $value ?> } </style>Long Nguyen
ModeratorHi Oliver,
You can use a
<a>tag to show a link and assign the URL field to thehrefattribute. Just like:<a href="{{ post.url }}">{{ post.url }}</a> -
AuthorPosts