diff --git a/kit/category-bestand.php b/kit/category-bestand.php index e6a793f..c71d1aa 100644 --- a/kit/category-bestand.php +++ b/kit/category-bestand.php @@ -3,27 +3,21 @@ 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 ''; + get_header(); + $categories = get_the_category(); $args = array( 'cat' => $categories[0]->cat_ID, 'orderby' => 'title', 'order' => 'ASC', + 'nopaging' => true, ); $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)); + array_push($available_chars, mb_substr(get_the_title(),0,1,"utf-8")); endwhile; wp_reset_postdata(); }; @@ -35,10 +29,11 @@ get_header();
@@ -66,28 +61,28 @@ get_header();