Meta Box
Support › MB Views › How to write with MB views
The following taxonomy is category, how to write using MB views
<?php $values = rwmb_meta( 'wysiwyg001', [ 'object_type' => 'term' ], get_queried_object_id() ) ?> <?php foreach ( $values as $value ) : ?> <?php echo do_shortcode( wpautop( $value ) ) ?> <?php endforeach; ?>
sory this
$term_id = get_queried_object_id(); $value = rwmb_meta( 'wysiwyg001', ['object_type' => 'term'], $term_id ); echo $value;
Hello,
You can use the proxy mb. to call the PHP function in the View template. For example:
mb.
{% set term_id = mb.get_queried_object_id() %} {% set value = mb.rwmb_meta( 'wysiwyg001', {object_type: 'term'}, term_id ) %} {{ value }}
Refer to this topic https://support.metabox.io/topic/how-to-get-field-value-in-the-settings-page/#post-46109 and documentation https://docs.metabox.io/extensions/mb-views/#running-php-functions