Display Categories in a Drop Down Menu

<form action=”<?php bloginfo(‘url’); ?>/” method=”get”>

<?php
$select = wp_dropdown_categories(‘show_option_none=Select Category&show_count=1&orderby=name&echo=0&selected=6′);
$select = preg_replace(“#<select([^>]*)>#”, “<select$1 onchange=’return this.form.submit()’>”, $select);
echo $select;
?>
<noscript><input type=”submit” value=”View” /></noscript>

</form>


About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s