title: How to target specific wp_nav_menu in function?
body: <p>I am adding a specific class on my wp_nav_menu via function.php but I am not able to target a specific menu: This is what I got</p>
  
  <pre><code>function add_menuclass_active($ulclass) {
     return preg_replace('/&lt;a /', '&lt;a class="list-group"', $ulclass, 1);
  }
   add_filter('wp_nav_menu', 'add_menuclass_active');
  </code></pre>
  
  <p>I tried also using with no luck</p>
  
  <pre><code>function add_menuclass_active($ulclass) {
    if( $ulclass['theme_location'] == 'CUSTOM MENU' )
     return preg_replace('/&lt;a /', '&lt;a class="list-group"', $ulclass, 1);
  }
  add_filter('wp_nav_menu', 'add_menuclass_active');
  </code></pre>