Skip to content

Snippet: Add New Staff Social Options

The following code snippet can be used to add new social options to your staff post type.

// Modify the staff social profiles options.
add_filter( 'wpex_staff_social_array', function( $profiles ) {

	// Add instagram.
	$profiles['instagram'] = array (
		'key'        => 'instagram',
		'meta'       => 'wpex_staff_instagram',
		'icon_class' => 'ticon ticon-instagram',
		'label'      => 'Instagram',
		'svg'        => 'ticons/instagram',
	);

	// Return profiles.
	return $profiles;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top