Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Here is an example code to show
tripdayandeventfrom the singletripview. Screenshot https://imgur.com/P7nTxfm<h1>Trip: {{ post.title }}</h1> {% set tripday_args = { relationship: { id: 'relationship-trip-to-tripday', from: post.ID }, nopaging: true, post_type: 'tripday' } %} {% set tripdays = mb.get_posts( tripday_args ) %} <ul> {% for tripday in tripdays %} <li>Tripday: {{ tripday.post_title }}</li> {% set event_args = { relationship: { id: 'relationship-trip-day-to-event', from: tripday.ID }, nopaging: true, post_type: 'event' } %} {% set events = mb.get_posts( event_args ) %} <ul> {% for event in events %} <li>Event: {{ event.post_title }}</li> {% endfor %} </ul> {% endfor %} </ul>Refer to this topic https://support.metabox.io/topic/query-in-relationship-post-per-page/
Long Nguyen
ModeratorHi Angelo,
As you can see on your code, there is no setting
stdof the number field.[ 'name' => __( 'Number', 'your-text-domain' ), 'id' => $prefix . 'number_4mgm8pyvpnu', 'type' => 'number', 'std' => 111, ],In the builder, you can add the default value to the option "Default value", screen record https://share.getcloudapp.com/Jrun5n5g
Long Nguyen
ModeratorHi Angelo,
Please share the code that creates the
numberfield and a screen record on your site after you deactivate all plugins except Meta Box and switch to the standard theme of WordPress.Long Nguyen
ModeratorHi Erik,
Follow the WordPress documentation https://developer.wordpress.org/reference/functions/get_terms/
You have to pass an array of parameters to the function
get_terms()and assign a value to the parametertaxonomy. Please refer to this topic to get terms in View https://support.metabox.io/topic/loop-through-taxonomy-parent-and-child-terms/November 21, 2021 at 9:13 PM in reply to: ✅Showing Custom Fields of related Terms in Single Post #32082Long Nguyen
ModeratorHi,
Please refer to this topic to know how to output the term meta value on the single post page https://support.metabox.io/topic/taxonomy-image-on-custom-post-type/
Long Nguyen
ModeratorHi Timo,
If you use an image field in the group as a subfield, the value stored in the database is the attachment ID. Then you have to use a PHP function via the proxy to get the image details based on the ID. For example: WordPress function wp_get_attachment_image_url()
Please get more details on the documentation
https://docs.metabox.io/extensions/meta-box-group/#sub-field-valuesLong Nguyen
ModeratorHi Steve,
If you add the code to output the map in the post template, you can use the WordPress function get_the_title() to show the current post title. For example:
'info_window' => '<h3>'. get_the_title() .'</h3><p>Content</p>.'Long Nguyen
ModeratorHi,
I think the problem is: the meta box Monitor Fields is assigned to the post type
monitorwhile you are using the fieldpostto show the child posts of the post typecontroller. Please set the post type correctly and re-check it.Long Nguyen
ModeratorThank you for your referral. Have a nice day.
November 21, 2021 at 5:16 PM in reply to: Front End Submission Deletes Images on Submit For Single Image fields #32072Long Nguyen
ModeratorHi Omni,
Thank you for your feedback.
I got the issue. Please remove the attribute
ajaxin your frontend shortcode to save the image. I've escalated this issue to the development team to fix it in the next update.Long Nguyen
ModeratorHi Sheldon,
If you use the component Author Avatar of Oxygen Builder to show the custom avatar, please refer to this topic to use another code to show the custom avatar in Oxygen.
https://support.metabox.io/topic/metabox-user-avatar-not-working-with-elementor-author-widget/And change the field ID to
custom_avatar$custom_avatar = rwmb_meta( 'custom_avatar', [ 'object_type' => 'user' ], $user_id );Long Nguyen
ModeratorHi,
The code
<mark>could be added by the SearchWP plugin, it is not a standard code of the Builder. You can try to deactivate SearchWP and re-check it.November 19, 2021 at 7:21 PM in reply to: Delete permanently or empty trash - Notice wpdb::prepare #32048Long Nguyen
ModeratorHi,
Thank you for your feedback.
I've escalated this issue to the development team to fix it in the next update.
Long Nguyen
ModeratorHi,
You can use the attribute
post_statusto set the post statusprivatefor posts submitted via the frontend form.[mb_frontend_form id="meta-box-id" post_fields="title,content" post_status="private"]Please get more details on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributes
November 19, 2021 at 12:34 PM in reply to: Is there an easy way to enable custom fields in the quick edit screen? #32039Long Nguyen
ModeratorHi,
Meta Box does not support editing the field in the Quick Edit section. You can use the plugin Admin Columns and their addon Meta Box Integration to edit the field in Admin Columns.
-
AuthorPosts