Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Please refer to this topic to prevent the error appears https://support.metabox.io/topic/assign-sub-field-value-to-the-variable/
Long Nguyen
ModeratorHi,
If Oxygen supports the shortcode template, you can create a custom callback function to display the shortcode.
Field:
array( 'type' => 'custom_html', 'std' => '<div class="alert alert-warning">This is a custom HTML content</div>', 'callback' => 'display_template', ),Callback:
function display_template() { echo do_shortcode( '[template_shortcode]' ); }January 19, 2022 at 9:21 PM in reply to: ✅Front End Form and Custom Model - Not Saving Data To Custom Table #33332Long Nguyen
ModeratorHi,
The extension MB Frontend Submission does not support creating the custom model on the frontend. I will inform the development team to explore the possibility.
Long Nguyen
ModeratorHi,
Please refer to this topic to know why the error message
Illegal string offset 'gallimage'appears.
https://support.metabox.io/topic/assign-sub-field-value-to-the-variable/If you want to show the gallery image subfield, you can put the helper function
rwmb_meta()in the loop and pass the post ID to this function.$the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); $digalleries = rwmb_meta( 'digallery', '', get_the_ID() ); $image_ids = $digalleries['gallimage']; foreach ( $image_ids as $image_id ) { $image = RWMB_Image_Field::file_info( $image_id, ['size' => 'thumbnail'] ); echo '<img src="' . $image['url'] . '">'; } endwhile; endif;Refer to this documentation https://docs.metabox.io/extensions/meta-box-group/#sub-field-values
Long Nguyen
ModeratorHi,
You can use the field
textareaorwysiwygto add the HTML code and output the value with theechofunction. But the content (HTML tags) might be filtered by sanitization. You can follow this documentation to bypass it https://docs.metabox.io/sanitization/Long Nguyen
ModeratorHi,
Thanks for your feedback.
I've informed the development team to re-check the issue and get back to you later.
Long Nguyen
ModeratorHi Dom,
If you want to show the post on the settings page, you also have to use the Custom HTML field to show it up. There is no actions or templates that support showing post on the settings page like that.
January 19, 2022 at 12:57 PM in reply to: rwmb_meta not returning value for users custom table #33319Long Nguyen
ModeratorHi,
You need to hook your function to the action
initwith priority later than 20 or other later hooks to run the helper functions.Or you can query directly to the database via the class
$wpdbto get the value. Refer to the documentation
https://developer.wordpress.org/reference/classes/wpdb/
https://docs.metabox.io/extensions/mb-custom-table/#query-posts-with-wp_queryLong Nguyen
ModeratorHi,
In short, no. The data in the custom table is not deleted automatically. You can hook a function that calls the delete API of the custom table to the action
delete_postto remove all data associated with that post.Refer to the documentation https://developer.wordpress.org/reference/hooks/delete_post/
https://docs.metabox.io/extensions/mb-custom-table/#deleteJanuary 18, 2022 at 12:50 PM in reply to: rwmb_meta not returning value for users custom table #33301Long Nguyen
ModeratorHi Nicholas,
Where did you use the helper function
rwmb_meta()to get the value? I've just added it to the post template and it works well, here is the screen record https://monosnap.com/file/cpPQE3QCCeVAsJhvyoTI6qTwhsuqKXLong Nguyen
ModeratorHi,
In case of using Oxygen Builder, please reach to them if you have any issues with installation, configuration, compatibility, or usage.
Refer to our support policy https://support.metabox.io/topic/support-policy/January 18, 2022 at 12:27 PM in reply to: ✅Filter the posts based on specific category in views #33299Long Nguyen
ModeratorHi Kirb,
Please refer to this topic to query posts by taxonomy https://support.metabox.io/topic/create-filter-by-category/
Long Nguyen
ModeratorHi,
They have to create a post or be assigned to be an author to show the View content. Regarding the author of a CPT is not counted, I also experienced that issue. Thanks for your feedback, I will inform the development team to fix all issues.
January 17, 2022 at 10:33 PM in reply to: ✅Use same custom field with two page templates with slight variation in wp admin #33288Long Nguyen
ModeratorHi,
It is not possible to have two meta boxes and fields with the same ID on a page so the conditional logic extension will not work. You can use the extension MB Include Exclude to load the meta box based on the template saved. For example:
$meta_boxes[] = [ 'title' => 'Section One', 'id' => 'section1', 'post_types' => ['page'], 'include' => array( 'template' => 'page-template-1.php', ), 'fields' => [ ... ] ]; $meta_boxes[] = [ 'title' => 'Section One', 'id' => 'section1', 'post_types' => ['page'], 'include' => array( 'template' => 'page-template-2.php', ), 'fields' => [ ... ] ]; $meta_boxes[] = [ 'title' => 'Section Two', 'id' => 'section2', 'post_types' => ['page'], 'include' => array( 'template' => 'page-template-2.php', ), 'fields' => [ ... ] ];Refer to the documentation https://docs.metabox.io/extensions/meta-box-include-exclude/
Long Nguyen
ModeratorHi,
If you do not pass the third parameter to the helper function
rwmb_meta(), it will use the current post ID. So if you add the shortcode to the template builder, the helper function will use the ID of the template and try to get the field value of this post because the template is also a post type then the helper function will return nothing and you will see an error message like that.You can check the group value is not empty to avoid showing the error message.
$app_details = rwmb_meta( 'app_details' ); if( !empty( $app_details ) ) { $method = $app_details['method']; ... }Read more on the documentation https://docs.metabox.io/rwmb-meta/
-
AuthorPosts