select active in menu using wordpress
<p>I have this menu in wordpress, my problem is - I want that when I click on the page like agenda page the agenda menu will be class="currentpage". I'm not really familiar in wordpress in active menus. I added a code in functions.php here is my code -</p>

<pre><code>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[] = 'currentpage';
    }
    return $classes;
}
</code></pre>

<p>Here is my html menu -</p>

<pre><code>&lt;li&gt;&lt;a href="&lt;?php bloginfo('url')?&gt;/about/" class=""&gt;&lt;span&gt;about&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="&lt;?php bloginfo('url')?&gt;/agenda/" class=""&gt;&lt;span&gt;agenda&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="&lt;?php bloginfo('url')?&gt;/past-conferences/"  class=""&gt;&lt;span&gt;past conferences&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>I want that to be inserted in class="currentpage"
How will I able to work on this thing?
Any help is muchly appreciated TIA.</p>