GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress help please (https://gfy.com/showthread.php?t=1075749)

LouiseLloyd 07-24-2012 10:37 AM

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

LouiseLloyd 07-24-2012 11:10 AM

Figured it out, but thanks for looking :D


All times are GMT -7. The time now is 12:32 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123