[wp-hackers] Modify Search Functionality
Robert Deaton
false.hopes at gmail.com
Tue Jun 21 06:19:43 GMT 2005
I already linked to the necessary resources at the codex.
Don't forget to set $wpdb to global in the function.
On 6/21/05, Nikolay Bachiyski <nbachiyski at developer.bg> wrote:
> ml_wordpress at copperleaf.org wrote:
> > I want to be able to add some columns in a table I've added with a
> > plugin to the standard search. How would I go about doing this? Is there
> > any kind of filter that I can use to modify the query string?
> >
> > Bill
>
> Let us talk in code first:
>
> function modify_search_string($query) {
> $query->set('s', 'baba');
> }
>
> add_action('parse_query', 'modify_search_string');
>
> $query is a reference to the WP_Query object whose parse_query is
> called. For details about what can you do with $query see the WP_Query
> code in classes.php (nope, I didn't find WP_Query docs in the codex).
>
> Nikolay
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
--Robert Deaton
http://somethingunpredictable.com
More information about the wp-hackers
mailing list