The unexpected behavior occurred in my “single-program.php.” The following commas appeared out of nowhere:
<?php
$relatedProfessors = new WP_Query(array(
'posts_per_page' => -1,
'post_type' => 'professor',
'orderby' => 'title',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'related_programs',
'compare' => 'LIKE',
'value' => '"' . get_the_ID() . '"'
) <- here
) <- and here
));
also ...
$today = date('Ymd');
$homepageEvents = new WP_Query(array(
'posts_per_page' => 2,
'post_type' => 'event',
'meta_key' => 'event_date',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'event_date',
'compare' => '>=',
'value' => $today,
'type' => 'numeric'
),
array(
'key' => 'related_programs',
'compare' => 'LIKE',
'value' => '"' . get_the_ID() . '"'
) <- here
) <- and here
));
the curly brackets { } appeared in my header, driving me nuts:
<li <?php if (get_post_type() == 'program') echo 'class="current-menu-item"' ?>><a href="<?php echo get_post_type_archive_link('program'); ?>">Programs</a></li>
<li <?php if (get_post_type() == 'event' OR is_page('past-events')) echo 'class="current-menu-item"' ?>><a href="<?php echo get_post_type_archive_link('event'); ?>">Events</a></li>
<li <?php if (get_post_type() == 'campus') echo 'class="current-menu-item"' ?>><a href="<?php echo get_post_type_archive_link('campus'); ?>">Campuses</a></li>
<li <?php if (get_post_type() == 'post') echo 'class="current-menu-item"' ?>><a href="<?php echo site_url('/blog'); ?>">Blog</a></li>
</ul>
I believe the unwanted brackets appeared around the echo statements. I’ll make the adjustment to auto_match_enabled line …
Thanks for the input.