WordPress: come aggiungere un testo predefinito ai riassunti dei post

WordPress: come aggiungere un testo predefinito ai riassunti dei post

Possiamo aggiungere del testo predefinito ai riassunti di WordPress. Vediamo come.

Aggiungete il seguente codice al file functions.php:


function my_excerpt_content( $content ) {
    $content = __( 'Testo predefinito', 'textdomain' );
    return $content;
}
add_filter( 'default_excerpt', 'my_excerpt_content' );
Torna su