how to display wordpress tags in a drop down menu?

code snippet from this page is:

<h2><?php _e('Posts by Tags'); ?></h2>
<form action="<?php bloginfo('url'); ?>/" method="get">
<div>
<?php
$select = wp_dropdown_categories('taxonomy=post_tag&show_option_none=Select tag&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><div><input type="submit" value="View" /></div></noscript>
</div></form>

when i try and implement this and select an option from the drop down list, it goes to a page url with the format:

Read More

http://sitename.com/?cat=5

and then displays a 404 error.

so my question is:

how can i get the option selected to link to posts with the associated tag rather than a category?

thank you.

UPDATE:

my solution was to install the wordpress taxonomy drop down widget.

Related posts

Leave a Reply