i'm working on this tutorial called "How to Create an Advanced Search Form for WordPress" (http://fearlessflyer.com/2012/10/how-to-create-an-advanced-search-form-for-wordpress/) and it works perfect. But i have a problem trying to show the Taxonomy-name instead of the Taxonomy-slug in the first 'Option' selector.
I know the problem is here, in 'functions.php' but i don't know how to rewrite it to get what i want:
function buildSelect($tax){
$terms = get_terms($tax);
$x = '<select name="'. $tax .'">';
$x .= '<option value="">'. ucfirst($tax) .'</option>';
foreach ($terms as $term) {
$x .= '<option value="' .$term->slug . '">' . $term->name . '</option>';
}
$x .= '<select>';
return $x;
}
I'd appreciate any help to solve this. Thank you very much.