WordPress: aggiungere e rimuovere i profili social degli utenti

In WordPress è semplice aggiungere e rimuovere i profili social degli utenti.

Aggiungete il seguente codice al file functions.php del vostro tema:


function my_new_contact_methods( $contactmethods ) {
    $contactmethods['twitter'] = 'Twitter'; // Aggiunge Twitter
    $contactmethods['facebook'] = 'Facebook'; // Aggiunge Facebook
    unset($contactmethods['yim']); // Rimuove YIM
    unset($contactmethods['aim']); // Rimuove AIM
    unset($contactmethods['jabber']); // Rimuove Jabber

    return $contactmethods;
}
add_filter( 'user_contactmethods','my_new_contact_methods', 10, 1 );

Qualora non vogliate rimuovere YIM, AIM e Jabber è sufficiente che non inseriate le relative righe di codice nella funzione.

Torna su