I’m engaged on my header navigation and I need to underline the menu merchandise for sure circumstances.
I want to add a CSS class if
- the put up has the ID 21638, or
- the put up has the meta worth ‘bloom’
The meta worth is an ACF relationship subject.
<nav class="header-navigation">
<ul class="header-navigation__list">
<li <?php if (is_single(21638)) or (metadata_exists('bloom') echo 'class="current-menu-item"' ?>><a href="<?php echo site_url('/labels/bloom') ?>">Bloom</a></li>
</ul>
I managed to resolve the put up ID half, however how do I add situation relating to meta worth?