diff --git a/kit/category-bestand.php b/kit/category-bestand.php index 128308d..ec3cb7c 100644 --- a/kit/category-bestand.php +++ b/kit/category-bestand.php @@ -4,6 +4,30 @@ Template Name: Bestand */ get_header(); + + + $numberofusers = $wpdb->get_results( " + SELECT post_title + FROM {$wpdb->posts} + WHERE post_type = 'post' and post_status = 'publish' + ORDER BY post_title ASC" ); + //echo '
'; print_r($numberofusers); echo ''; + + $args = array( + 'cat' => $categories[0]->cat_ID, + 'orderby' => 'title', + 'order' => 'ASC', + ); + $query = new WP_Query( $args ); + $available_chars = []; + if ( $query->have_posts() ) { + while ( $query->have_posts() ) : + $query->the_post(); + array_push($available_chars, substr(get_the_title(),0,1)); + endwhile; + wp_reset_postdata(); + }; + ?>