[wp-hackers] Custom search, how ?
Lox
lox.dev at knc.nc
Wed Aug 18 03:34:48 UTC 2010
Hello,
Since a couple of months, I have learned a lot about Wordpress dev, but it
seems I missed something....
I have to make a search engine for a custom post_type. I use a short-code so
the search engine can appear in any page.
The search engine short-code outputs a form, and an empty div (intended for
results). So when I submit my form, my short-code catches it like this:
if(isset($_GET['fs'])) {
$results = $this->search();
}
Because it is like it and can't be done differently, I have to use a custom
database table with a lot of additional informations concerning the
post_type, the join can be done using a custom meta field.
I am currently trying to do like so:
$args = array ('post_type' => 'formation', 'fs'=>'1',
'custom_field_in_custom_table" = 'value');
$posts = get_posts($args);
Then to add a join I use the posts_join filter witch doesn't seems to being
called at all.
How am I supposed to do that the wordpress way?
--
Lox
lox.dev at knc.nc
More information about the wp-hackers
mailing list