[wp-hackers] New Feature: get_categories function
John Keyes
john at integralsource.com
Mon Nov 7 10:33:27 GMT 2005
Had anyone any comments on this?
-John K
John Keyes wrote:
> Hi,
>
> I posted this on the support forum tonight, where it
> was recommended to post it here so you guys get to
> read it.
>
> I have an archive dropdown working as follows:
>
> <select onchange="if (this.selectedIndex != 0) { window.location =
> this[this.selectedIndex].value; }">
> <option>Choose Month...</option>
> <?php get_archives('monthly','','option'); ?>
> </select>
>
> I think a category dropdown that works in a similar fashion would be
> great e.g. get_categories('format', 'name', 'before', 'after'); ?>
>
> <select onchange="if (this.selectedIndex != 0) { window.location =
> this[this.selectedIndex].value; }">
> <option>Choose Category...</option>
> <?php get_categories('option', 'name'); ?>
> </select>
>
> Of course this is not possible at the moment using the dropdown_cats
> function as it creates the <select>, therefore preventing me from adding
> the onchange attribute. It also sets the value attribute of each option
> to it's index rather than the category URL which is required for
> changing the window.location.
>
> Has this type of functionality been considered before?
>
> Thanks,
> -John K
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list