Congratulations to Harald Bader, who took first place in the open class at the 48th Klippeneck Gliding Competition (29 July 2016 – 6 August 2016) with his EB29D two-seater.
Results
$max_words ) {
$words = array_slice( $words, 0, $max_words );
return implode( ' ', $words ) . '...';
}
return implode( ' ', $words );
}
if ( is_single() ) {
// Kategorien holen
$categories = get_the_category();
if ( empty( $categories ) ) {
return;
}
// Standard: erste Kategorie
$primary_category_id = (int) $categories[0]->term_id;
$primary_category = $categories[0];
// Yoast Primary Term, falls vorhanden
if ( class_exists( 'WPSEO_Primary_Term' ) ) {
$wpseo_primary_term = new WPSEO_Primary_Term( 'category', get_the_ID() );
$primary_id = $wpseo_primary_term->get_primary_term();
if ( $primary_id && ! is_wp_error( $primary_id ) ) {
$primary_category_id = (int) $primary_id;
$primary_category = get_category( $primary_category_id );
}
}
if ( ! $primary_category_id || ! $primary_category ) {
return;
}
// Alle Beiträge der Kategorie holen (nach Veröffentlichungsdatum)
$all_posts = get_posts( [
'posts_per_page' => -1,
'cat' => $primary_category_id,
'post_type' => 'post',
'post_status' => 'publish',
'orderby' => 'post_date',
'order' => 'ASC',
'fields' => 'ids',
'suppress_filters' => false,
] );
if ( empty( $all_posts ) ) {
return;
}
// Position des aktuellen Beitrags im Array finden
$current_post_id = get_the_ID();
$current_index = array_search( $current_post_id, $all_posts, true );
if ( $current_index === false ) {
return;
}
$anzahl = count( $all_posts );
// Kategorie-Link
$category_link = get_category_link( $primary_category_id );
$category_name = $primary_category->name;
echo '
';
echo '
';
echo '';
// Linke Spalte: vorheriger Beitrag oder leer (links ausgerichtet)
echo '';
if ( $current_index > 0 ) {
$prev_id = $all_posts[ $current_index - 1 ];
$prev_title = truncate_title_words( get_the_title( $prev_id ), 6 );
echo ''
. ' ' . esc_html( $prev_title ) . ' ';
}
echo ' ';
// Mittlere Spalte: Kategorie-Link (zentriert)
echo '';
echo ''
. esc_html( $category_name ) . ' ';
echo ' ';
// Rechte Spalte: nächster Beitrag oder leer (rechts ausgerichtet)
echo '';
if ( $current_index < $anzahl - 1 ) {
$next_id = $all_posts[ $current_index + 1 ];
$next_title = truncate_title_words( get_the_title( $next_id ), 6 );
echo ''
. esc_html( $next_title ) . ' ';
}
echo ' ';
echo ' ';
echo ' ';
echo '
';
}
?>