I have read and repeatedly tried to implement the code on this page to display fields:
https://docs.metabox.io/displaying-fields/
but it just isn't working.
Here is the code from metabox for creating my metabox:
function coaching_lesson_meta_box( $meta_boxes ) {
$prefix = 'prefix-';
$meta_boxes[] = array(
'id' => 'coaching_lessons-metabox',
'title' => esc_html__( 'Coaching Lesson Components', 'metabox-online-generator' ),
'post_types' => array('post', 'page', 'coaching_program', 'coaching_lesson' ),
'context' => 'after_title',
'priority' => 'default',
'autosave' => 'false',
'fields' => array(
array(
'id' => $prefix . 'coaching_lesson_summary',
'type' => 'textarea',
'name' => esc_html__( 'Summary of Coaching Lesson', 'metabox-online-generator' ),
),
This is the code on my single-coaching_lesson.php page:
<?php astra_entry_before(); ?>
<article itemtype="https://schema.org/CreativeWork" itemscope="itemscope" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php astra_entry_top(); ?>
<?php astra_entry_content_single();
?>
<?php
$value = rwmb_meta( 'coaching_lesson_summary' );
echo $value;
?>
It just isn't showing on the page.
What am I doing wrong?
Thank you very much
Sean