Wordpress' suggerisce aggiungendo quanto segue al functions.php per abilitare quello che voglio fare:Usa l'estratto di Wordpress con un link "altro"? documentazione
function new_excerpt_more($post) {
return '<a href="'. get_permalink($post->ID) . '">' . 'Read the Rest...' . '</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
Secondo: http://codex.wordpress.org/Function_Reference/the_excerpt
Ma quando aggiungo questo per functions.php, e tento di usalo, non vedo più link. Ecco come provo a usarlo:
the_excerpt(__('(more...)'));
Ho anche provato:
the_excerpt();
Aggiornamento: Ho provato quanto segue, ma neanche restituisce un errore (se non argomenti), o non visualizza alcun brano o niente (se un argomento):
function new_excerpt_more($excerpt) {
$link = get_permalink();
$title = the_title('','',false);
$ahref = '<a href="'.$link.'" title="'.$title.'">more...</a>';
return str_replace('[...]', $ahref, $excerpt);
}
add_filter('wp_trim_excerpt', 'new_excerpt_more');
Credo che si dice "a volte è più significativo". Inoltre, penso che usarlo annulli il campo di input dell'estratto? – Matrym
Sì, hai ragione - ho misspoke. Penso di aver frainteso quello che stavi cercando di realizzare. – Ian
Grazie per aver scattato :) – Matrym