.current-menu-item not showing up on two links
-
I have 4 links on my main nav but two aren’t accepting .current-menu-item for some reason.
HOME (using custom url)
PHOTOGRAPHY (CPT archive page archive-photography.php)
FIELD JOURNAL(CPT archive page archive-fieldjournal.php)
INFORMATION (using page.php)photography and field journal aren’t highlighting for some reason. I’m assuming that because I set up the CPT’s as pages instead of just leaving them as an archive is messing with things? But that has never happened to me before. I’ve done this many times. Here’s a bit more info…
(header.php)
<?php $args = array('theme_location' => 'primary'); ?> <?php wp_nav_menu($args); ?>
(functions.php)
register_nav_menus(array( 'primary' => __('Primary Header Menu'), 'footer' => __('Primary Footer Menu') ));
(HTML output)
<ul> <li id="menu-item-76" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-76"><a href="https://localhost/wordpress">Home</a> </li> <li id="menu-item-281" class="menu-item menu-item-type-post_type menu-item-object- page menu-item-281"><a href="https://localhost/wordpress/photography/">Photography</a> </li> <li id="menu-item-284" class="menu-item menu-item-type-post_type menu-item-object- page menu-item-284"><a href="https://localhost/wordpress/field-journal/">Field Journal</a> </li> <li id="menu-item-119" class="menu-item menu-item-type-post_type menu-item-object- page menu-item-119"><a href="https://localhost/wordpress/information/">Information</a> </li> </ul>
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘.current-menu-item not showing up on two links’ is closed to new replies.