Integrating PODS and WP Search
Anyone know of a solution? as it is, all products that are managed by pods are not searchable via WP search. THere have been mentions of plugins coming, and 2.0, but in the meantime?
2 Answers
I've played around with a bunch of different options, and I found that a Google Custom Search was the most comprehensive.
WP has a search.php template under your theme's folder that you need to customize, remove the LOOP of if have_posts() etc n all you dont need that if you plan to not show blog posts
on that page you will get the search term in the parameter s pass that to search any particular field in the pod for eg:
$query = pods_url_variable('s','get');
$deal = new Pod('deal');
$deal->page = 1;
$deal->search = false;
$deal->findRecords('id DESC', -1, "(t.name LIKE '%$query%')");
$total_deals = $deal->getTotalRows();
further style n show results as you please this implementation is very simple, google does give better results but will also mention google custom search n the results cannot be shown the way you want in terms of styling etc....
another way could be to use MySQL full-text search have fun!


