
In version 0.9 I finally included an advanced meta search box. It can be easily styled and you can even have several boxes on the same page.
The code to display it is simple: <?php meta_filter_box() ?>.
If you don’t want to use a certain key as a filter, you can write
<?php meta_filter_box($exclude = array('key1', 'key2')) ?>
Make sure your theme has wp_footer() written somewhere in footer.php.

great scribu!!
i have some problem with my meta.php file
in there i cannot access to my custom field….why?
eg.
http://home.edizioninottetempo.it/category/stampa/rassegna-stampa/?autore=Milena+Agus
outupt different than
http://home.edizioninottetempo.it/category/stampa/rassegna-stampa/?s=milena+agus&x=0&y=0
but under the title i have the same echo custom fields
any ideas?
You should use echo get_meta_title() instead.
Maybe you added the function outside The Loop. Try using get_linked_meta(). If you still have trouble, paste your complete meta.php to pastebin.
i use
You should try pasting your code to http://pastebin.ca
http://pastebin.ca/1347173
http://pastebin.ca/1347203
thanks scribu but my problem is to echo also other custom field related to that post…
not only the one related to the meta.php
eg.
http://home.edizioninottetempo.it/category/stampa/rassegna-stampa/?autore=Milena+Agus
in this case i cannot acces other custom field i would need more than “autore”
for example i have some post with a pdf attachment…
and this code
http://pastebin.ca/1347273
doesn’t work on meta.php as i work on archive….search…
look at this case:
http://home.edizioninottetempo.it/category/stampa/rassegna-stampa/?autore=Giorgio+Agamben
the pdf icon link it to one file…
but the content goes to the right file…
this is my meta.php
http://pastebin.ca/1347288
I don’t quite understand. Explain to me like this:
1. code line
2. output
3. expected output
Your meta.php looks okay though. The plugin DOES NOT interfere with get_post_meta() or the loop internals.
http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/
This was what I had in mind for the smart search widget.
Nice tutorials, but they only work with one dropdown. How do you combine two or more?
And even if you could, you wouldn’t be able to specify the value for each field, which is pretty limiting.
maybe this is better:
http://code.google.com/p/jqueryselectcombo/
I don’t see how that is better than the current solution. (Except of course for your site, for which I invited you to send me an email).
Whatever. The first example is what I envisage in terms of style – the technicalities are probably much more complex – like running similar queries from WP DropDown metas or something to populate the dropdowns as they are selected.
The “style” can be edited through CSS in your theme. You’re talking about functionality here. The example that you pointed to will most likely be appropriate only in your particular case.
If you want custom coding, just send me an email.
For those having trouble using the template tag get_post_meta, try using the get_the_ID() function instead of $post->ID. Doing this worked for me.
an example of this? “using the get_the_ID() function instead of $post->ID. Doing this worked for me.”
great scribu! this was the answer to my question!
You should thank Griffology, not me.
ops!!! thanks very much Griffology! great job
now i have some problem with custom fields value that have symbols like “è ?)….
it comes with a fatal error..
the value is “che cos’è il contemporaneo?”
http://home.edizioninottetempo.it/?cat=56&titolo=Che%20cos%27%C3%A8%20il%20contemporaneo?
Try using htmlentities() on the meta value.
no way with htmlentities()….is there any way to put the value among “….”