Drop down menu from titles
-
Hi,
How do you create a drop down from the entries of a category?http://www.contrecoups.com/work
This is the code i use to display only the titles entries of WORK category in my sidebar. But i want to have those be in a drop down menu instead of just displayed, as i will add many more entries soon adn don’t want people to have to scroll… Or if anyone has a better idea… thanks
<li id="categories"> <br /> <span class="navlinks"><a href="http://contrecoups.com/work/?cat=1">News</a></span><br /> <span class="navlinks"><a href="http://contrecoups.com/work/?cat=10">Blog</a></span> <h2>Work:</h2> <ul> <!--<a href="<?php the_permalink() ?>" rel="bookmark">»<?php the_title(); ?></a>--> <?php $myposts = get_posts('numberposts=500&offset=0&category=2'); foreach($myposts as $post) : ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br /> <?php endforeach; ?> <!-- <?php wp_list_cats(); ?> --> </ul> </li>
- The topic ‘Drop down menu from titles’ is closed to new replies.