Add New Social Options for the Top Bar and The Social Menu

This is a Developer Level doc.

If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.

If you are using OceanWP 2.0.9 version or later, you will need to make corrections to the icon-class part in the code.


Instead of:

'icon_class' => 'fab fa-tripadvisor',

Use  this:

'icon_class' => oceanwp_icon( 'tripadvisor', false),

You can find the list of all available OceanWP SVG Icons here.

Need to display an icon that is not added to theme list? Learn how to add it here.

If you want to include new social links into the Top Bar or Header Social Menu, use the following PHP snippet:

 * Add new social options in the Customizer
function my_ocean_social_options( $array ) {

	// TripAdvisor icon
	$array['tripadvisor'] = array(
		'label' => 'TripAdvisor',
		'icon_class' => 'fab fa-tripadvisor',

	// Amazon icon
	$array['amazon'] = array(
		'label' => 'Amazon',
		'icon_class' => 'fab fa-amazon',

	// Return
	return $array;

add_filter( 'ocean_social_options', 'my_ocean_social_options' );

*Icon classes have been altered to correspond to the Font Awesome 5 classes. If you are still using Font Awesome 4, visit the following link to get the correct class: Font Awesome 4 Icons.

Useful link: Font Awesome 5 Icons.

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.