function ultimate_posts_groupby($groupby) { if (is_utwtag() || is_search()) { if ($groupby == '') { $groupby = $wpdb->posts . ID; } else { if (strpos($groupby, $wpdb->posts . ID) == false || strpos($groupby, 'posts.ID') == false) { // do nothing. } else { // add to the end $groupby .= ',' . $wpdb->posts . ID; } } } return $groupby; }
function is_tag() { return is_utwtag(); }