How can I search content fields? I would like to display my seeds but group each into female, and male. I have a content field for this but not sure how to group them together.
The only file I found was search not pto_search is this the same file? Also in the search file I found
if ($config_searchDescription)
{
$where .= " OR description LIKE '%".database_safe($word)."%'";
}
is this the text I need to change?
Hi Shaun,
Ah, yes - that's standalone Price Tapestry, but you have identified the exact similar portion of code - (search.php standalone is equivalent to pto_search.php in the plugin) - so to include gender in the search, the replacement would be:
$where .= " OR gender LIKE '%".database_safe($word)."%'";
if ($config_searchDescription)
{
$where .= " OR description LIKE '%".database_safe($word)."%'";
}
Cheers,
David.
--
PriceTapestry.com
Hi Shaun,
This is straight forward for a niche site where full text indexing isn't required; so the first step would be to disable that (at least within the plugin) by setting the $config_useFullText to FALSE (wp-admin > Settings > PriceTa[estry.org, then scroll down to the External section)
Next, in pto_search.php, look for the following code beginning at line 272:
if ($pto_config_searchDescription)
{
$where .= " OR description LIKE '%".$wpdb->escape($word)."%'";
}
..and REPLACE with:
$where .= " OR gender LIKE '%".$wpdb->escape($word)."%'";
if ($pto_config_searchDescription)
{
$where .= " OR description LIKE '%".$wpdb->escape($word)."%'";
}
Cheers,
David.
--
PriceTapestry.com