Con questo trucco mostreremo solo una parte del contenuto, senza immagini.
Nell’index.php aggiungiamo al post del the_content
<?php the_excerpt(); ?>
in functions.php:
<!–Link della excerpt–>
<?php
function new_excerpt_more($more) {
global $post;
return ‘… <a href=”‘. get_permalink($post->ID) . ‘”>’ . ‘Continua a leggere’ . ‘</a>’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);
?>
<!–prendo 100 parole invece delle 55 di default–>
<?php function new_excerpt_length($length) {
return 100;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);
?>













