Add custom user_row_actions Website, Facebook, Twitter

Jetpack Review - activate modules

Adding this snippet to the functions.php of your wordpress theme will display new links beside the edit button in the users panel when you mouse over. If you have already added new contact methods Facebook, Twitter, etc. you can ignore the extra fields snippet and just use the second snippet.

( example screenshot )

function add_contactmethods( $contactmethods ) {
	$contactmethods['twitter'] = 'Twitter';
	$contactmethods['facebook'] = 'Facebook';
	return $contactmethods;
function profile_links( $actions, $user_object ) {
    $actions['website'] = '<a href="'.$user_object->user_url.'" target="_blank">WS</a>';
    $actions['facebook'] = '<a href="'.$user_object->facebook.'" target="_blank">FB</a>';
    $actions['twitter'] = '<a href="'.$user_object->twitter.'" target="_blank">TW</a>';
    return $actions;
add_filter( 'user_row_actions', 'profile_links', 10, 2 );

Comments  Leave a Reply

  1. i would like to add a custom filed but to the category page , a thumbnail field for categories !
    can you show me how to do that please ?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!