Wordpress help please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LouiseLloyd
    SO FUCKING SCAMMED
    • Mar 2010
    • 1429

    #1

    Wordpress help please

    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
    Last edited by LouiseLloyd; 07-24-2012, 09:46 AM.
  • LouiseLloyd
    SO FUCKING SCAMMED
    • Mar 2010
    • 1429

    #2
    Figured it out, but thanks for looking :D

    Comment

    Working...