Support » How-To and Troubleshooting » Tags Drop Down List
8 years, 9 months ago
Is there a way to display a drop down list of tags in the same way you can for categories with wp_dropdown_categories?
WordPress.org Tech Dude
No, it doesn’t appear that the code contains the same sort of tag dropdown stuff as it does for categories. It wouldn’t be difficult to add it though.
8 years, 2 months ago
okay does anyone know a code to make it into a dropdown list??
<?php wp_tag_cloud(‘smallest=10&largest=10&format=list’); ?> displays it as a list but I need it in a dropdown x_x
7 years, 10 months ago
Here’s the code I’m using for a basic dropdown list of tags.
if ($tags = get_tags( array('orderby' => 'name') ))
echo '<form action="'.get_bloginfo('url').'" method="get">';
echo '<select name="tag" id="tag" class="postform">';
foreach ($tags as $tag)
echo '<option value="'.$tag->slug.'">'.$tag->name.'</option>';
echo '</select> ';
echo '<input type="submit" name="submit" value="view" />';
bookchiq — can you provide a link so we can see how this looks?
also, where do you put this code? since I use widgets for my sidebar, I’m not sure exactly where I can put this code.