title: Custom links in wordpress menu is active in more than one menu item on loading the site
body: <p>I have a menu as below</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li class="active"&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="index.html#section1"&gt;About us&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="index.html#section2"&gt;How it works&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="index.html#section3"&gt;Features&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="index.html#section4"&gt;Pricing&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="Register now.html"&gt;Register now&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="contact.html"&gt;Contact us&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Second, third, fourth and fifth <code>&lt;li&gt;</code> are different sections in first <code>&lt;li&gt;</code> which I made as custom link in wordpress (like <a href="http://localhost/adams#section1" rel="nofollow">http://localhost/adams#section1</a>) and first as a wordpress page. When I added </p>
  
  <pre><code>add_action( 'init', 'testimonial_postTypes' );
  add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
  function special_nav_class($classes, $item){
   if( in_array('current-menu-item', $classes) ){
           $classes[] = 'active ';
   }
   return $classes;
  </code></pre>
  
  <p>}</p>
  
  <p>in fuctions.php to make the Home page active, all sections are also became active. Where I have to change? I am a beginner in wordpress. Also on scrolling different sections in home page I want to make corresponding menu active.</p>
  
  <p>I am attaching wp admin screenshot here<br>
  <a href="http://i.stack.imgur.com/2DZB0.png" rel="nofollow">link on backend</a></p>