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),

If your icon is not visible after the code change, make sure you have added it to the OceanWP theme icons array.

You can find the list of all available OceanWP SVG Icons here.  All icons on the list also exist in the OceanWP Theme Icons array with their Font Awesome or Simple Line Icons counterparts declared.

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.