Originally Posted by
robsmitties
Dear Toms,
I love the Advanced Search Widget you'v got there and i need one of those to.
When i install the
WP Custom Search plugin and configure the search form (custom fields) it keep on saying 0 results..
What does the trick to make this work? I will appreciate if you share your mod story with me
Hope to here from you soon..
Rob
Its saying 0 results for 1 of 2 reasons,
Reason 1: you need to modify line number 292 or 293 (anyway this line)
Code:
$where.= " AND ($wpdb->posts.post_type='posts')";
to:
Code:
$where.= " AND ($wpdb->posts.post_type='ad_listing')";
this will then give you all the custom fields options to chosses from in setting up the plugin,
however when you use it you will still get erroneous returns (featured ads problem) to get around this you need to open up search.php in cp theme folder and right before
Code:
<?php if(have_posts()) : ?>
past in this:
Code:
<?php if ($_GET['search-class']){query_posts('caller_get_posts=1');} ?>
job done!,
the mod i did was to create the search so that it would fit in horizontally within a clean install of cp, its hacked to bits and the widgets css is exploded, if you just require the search as a sidebar widget then download the plugin from
wp exchange and just do the changes listed in this post.