Return to Snippet

Revision: 11744
at February 17, 2009 10:35 by selfmadepsyche


Initial Code
<h2>Categories</h2>
<ul>
<?php wp_list_cats('sort_column=name'); ?>
</ul>



<form action="<?php bloginfo('url'); ?>/" method="get">
<?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#”, “<select$1 onchange=’return this.form.submit()’>”, $select); echo $select; ?>
<noscript><input type=”submit” value=”View” /></noscript>
</form>

Initial URL


Initial Description


Initial Title
Display Categories Normally or in Drop-Down Box

Initial Tags
wordpress

Initial Language
PHP