I have an ACF custom field which I have added to the MEC taxonomy template in the child theme. However, the field will not display on the public page.
Below is the template, saved in path/to/child-theme/
The added line is:
<p><?php echo the_field('category_description_top'); ?></p>
The section of the MEC template is:
/**
The Template for displaying mec-category taxonomy events
@author Webnus <info@webnus.biz>
@package MEC/Templates
@version 1.0.0
*/
get_header('mec'); ?>
<section id="<?php echo apply_filters('mec_category_page_html_id', 'main-content'); ?>" class="<?php echo apply_filters('mec_category_page_html_class', 'mec-container'); ?>">
<?php do_action('mec_before_main_content'); ?>
<?php do_action('mec_before_events_loop'); ?>
<h1 class="mec-cat-h1"><?php echo single_term_title(''); ?></h1>
<p><?php echo the_field('category_description_top'); ?></p>
<?php $MEC = MEC::instance(); echo $MEC->category(); ?>
<?php do_action('mec_after_events_loop'); ?>
</section>
I have tried with and without “echo” in the line of code. Have I missed something?
Thanks,
Christopher