Hi ich das "the excerpt" wird nicht beim aktuellen Post angewendet
ich hab ein der function.php
____________
function custom_trim_excerpt($text) { // Fakes an excerpt if needed
global $post;
if ( '' == $text ) {
$text = get_the_content('');
$text = apply_filters('the_content', $text);
$text = str_replace(']=]=>', ']=]=>', $text);
$text = strip_tags($text);
$excerpt_length = 30;
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words)> $excerpt_length) {
array_pop($words);
array_push($words, 'weiterlesen...');
$text = implode(' ', $words);
}
}
return $text;
}
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'custom_trim_excerpt');
___________
in der index.php rufe ich es mit "<?php the_excerpt(); ?>" auf.
Aus irgend einem grund funktioniert die abkürzung nicht beim ersten Post
http://www.kcserver.info/gfbv/
leider hab eich nichts brauchbraes gefunden