[wp-hackers] Select Menu to filter results by Custom Values
Kelter-BadCat Design
kelter at badcat.com
Wed Nov 19 19:39:15 GMT 2008
Hi,
I'm trying to get WordPress to return a dropdown
list (a SELECT MENU - similar to how we use
"wp_dropdown_categories") of VALUES for a
particular custom KEY that I've entered in the
Custom Field.
I'd like to use this dropdown list as a way to
filter the results (a listing of posts) shown on
the page.
I tried approaching it like this
< ?php echo get_post_meta($post->ID, 'time', $single = true); ? >
or
< ?php $key="time"; echo get_post_meta($post->ID, $time, $single = false); ? >
Whereas "time" is the Custom KEY. Additionally I
need the VALUES in a Select Menu so I can run the
filter via a form element.
Can anyone point me to any examples or possibly
something on the WP Codex? Seems like all
functions try to point me to "Post specific"
solutions.
thanks!
More information about the wp-hackers
mailing list