4文字以上の単語のみを表示したいのですが、実際にはヒット数を制限して、最小の単語のみを表示できます。100ヒット-しかし、どうすれば最小値を設定できますか。文字の長さ?ありがとう!
function sm_list_recent_searches($before = '', $after = '', $count = 20) {
// List the most recent successful searches.
global $wpdb, $table_prefix;
$count = intval($count);
$results = $wpdb->get_results(
"SELECT `terms`, `datetime`
FROM `{$table_prefix}searchmeter_recent`
WHERE 100 < `hits`
ORDER BY `datetime` DESC
LIMIT $count");
if (count($results)) {
foreach ($results as $result) {
echo '<a href="'. get_settings('home') . '/search/' . urlencode($result->terms) . '">'. htmlspecialchars($result->terms) .'</a>'.", ";
}
}
}