Using the MMenu WordPress plugin to list your categories (its what we use for this site)

  1. Target the menu like you would normally do with the MMenu WordPress plugin.
  2. Ensure your category listing on the page looks like this:
    <nav id="main-menu">
    <ul><?php wp_list_cats();?></ul>
    </nav>
  3. 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 );
    });