Integrating PODS and WP Search

0

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?

asked Jun 17 '11 at 7:18

fatpluto

1

add comment
enter at least 15 characters

2 Answers

0

I've played around with a bunch of different options, and I found that a Google Custom Search was the most comprehensive.

answered Jun 19 '11 at 2:50

chris.pilko

889

add comment
enter at least 15 characters
0

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!

answered Jun 20 '11 at 11:17

acenik

1

add comment
enter at least 15 characters