I want to add an archive drop down in the menu but can't seem to figure it out.
I want it to work like my categories drop down.
This is the code in functions.php:
function custom_menu(){
echo '<ul id="top-menu">';
$data = wp_list_categories('show_count=1&echo=0&title_li=<a href="#">Categories</a>');
$data = preg_replace('/\<\/a\> \((.*)\)/',' <span>$1</span></a>',$data);
echo $data;
wp_list_pages('title_li=&');
echo '</ul>';
}
So basically I want a "button" which sais "Archive", and when you hover your mouse over it, a drop down menu appears with all months.