I am wanting to create a category dropdown list outside of the widget area so added:
Code:
<?php wp_dropdown_categories( $args ); ?>
<script type="text/javascript">
/* <![CDATA[ */
var dropdown = document.getElementById("cat");
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
location.href = "http://mysite.com/?cat="+dropdown.options[dropdown.selectedIndex].value;
}
}
dropdown.onchange = onCatChange;
/* ]]> */
</script>
Which works fine, but my question is how do I add a default "- Select Model -" option to the list?
Grateful of any help, thanks <3