Bunu yapmak için ilk önce tema klasöründeki functions.php dosyasını açıyoruz ve ?>’den önce aşağıdaki kodu ekliyoruz.
Alıntı
remove_filter(’get_the_excerpt’, ‘wp_trim_excerpt’);
add_filter(’get_the_excerpt’, ‘custom_trim_excerpt’);
remove_filter(’get_the_excerpt’, ‘wp_trim_excerpt’);
add_filter(’get_the_excerpt’, ‘custom_trim_excerpt’);
function custom_trim_excerpt($text) { // Fakes an excerpt if needed
global $post;
if ( ” == $text ) {
$text = get_the_content(”);
$text = strip_shortcodes( $text );
$text = apply_filters(’the_content’, $text);
$text = str_replace(’]=]=>’, ‘]]>’, $text);
$text = strip_tags($text);
$excerpt_length = apply_filters(’excerpt_length’, 55);
$words = explode(’ ‘, $text, $excerpt_length + 1);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, ‘…’);
$text = implode(’ ‘, $words);
}
}
return $text;
}
Daha sonra index.php'de
<?php the_content(’Read the rest of this entry »’); ?> ve ya <?php the_content(’Devamını Oku »’); ?> yada <?php the_content(”); ?> yerine aşağıdaki kodu ekleyin.
Alıntı
<?php the_excerpt(); ?>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title(); ?>”>Devamını Oku »</a>
Wordpress’te Otomatik Devamını Oku Ekleme | 4harf.org Kolay gelsin.