This support ticket is created vor 4 Jahren, 7 Monaten. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
add_filter('wpv_filter_query', 'func_filter_by_title', 10, 2);
function func_filter_by_title($query, $setting) {
global $wpdb;
if($setting['view_id'] == 9999) {
if(isset($_GET['wpvalphabet']) and $_GET['wpvalphabet']!='' ){
$first_char = $_GET['wpvalphabet'];
$postids = $wpdb->get_col($wpdb->prepare("SELECT ID
FROM $wpdb->posts
WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s
AND post_type = '".$query['post_type'][0]."'
AND post_status = 'publish'
ORDER BY $wpdb->posts.post_title",$first_char));
$query['post__in'] = $postids;
}
}
return $query;
}