Using the MMenu WordPress plugin to list your categories (its what we use for this site)
- Target the menu like you would normally do with the MMenu WordPress plugin.
- Ensure your category listing on the page looks like this:
<nav id="main-menu"> <ul><?php wp_list_cats();?></ul> </nav>
- Now for the final part, add this to your functions.php file so the MMenu active class can be implemented in the category layout.
add_filter( 'wp_list_categories', function( $html ) { return str_replace( ' current-cat', ' current-menu-item', $html ); });
Joseph