Support » Fixing WordPress » Tags Drop Down List

  • weiran


    Is there a way to display a drop down list of tags in the same way you can for categories with wp_dropdown_categories?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    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.

    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

    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" />';
    		echo '</form>';

    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.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Tags Drop Down List’ is closed to new replies.