How I Added A Reddit Social Media Icon To My BB-Theme

I added the following to the functions.php file in the child theme and uploaded it via FTP.

// register the new setting for the new social media icon
// replace the word reddit below with the name of the social media icon you want to use
add_action( ‘customize_register’, ‘odw_customize_register’ );
function odw_customize_register( $customizer )
{
$customizer->add_setting( ‘fl-social-reddit’, array(
‘default’ => ‘’
) );

$customizer->add_control(
	new WP_Customize_Control( $customizer, 'fl-social-reddit', array(
		'label' 	=> 'Reddit',
		'section' 	=> 'fl-social-links'
	) )
);

}

// add our new social media icon into the list of icons output by the Beaver Builder Theme
// in our example we are using Reddit as the social media icon to be added so we add the word reddit below
add_filter( ‘fl_social_icons’, ‘odw_social_icons’ );
function odw_social_icons( $icons ) {
$icons = array(
‘facebook’,
‘twitter’,
‘instagram’,
‘google’,
‘reddit’,
‘youtube’,
‘linkedin’,
‘yelp’,
‘pinterest’,
‘tumblr’,
‘vimeo’,
‘flickr’,
‘dribbble’,
‘500px’,
‘blogger’,
‘github’,
‘rss’,
‘email’
);
return $icons;
}

I added the following to customize theme/additional css:

/* Add the below CSS to ouput the Reddit icon

  • Replace the word Reddit with your email social media icon
  • replace the unicode f281 with the unicode for your social media icon from Font Awesome */
    .fl-social-icons .fl-icon-reddit{font-family: FontAwesome; font-size: 17px;}
    .fl-icon-reddit-circle:before { content: ‘\f281’; }
    .fl-icon-reddit-regular:before { content: ‘\f281’; }
    .fl-icon-reddit.fl-icon-color-branded { color: #FF5700; }
    .fl-icon-reddit.fl-icon-color-branded:hover { color: #FF5700; }

I cleared the cached and it worked for me!

I don’t like to alter source code if I can help it, but this is what worked.

These are a couple of links that helped me figure it out.

https://wagepirate.com/custom-social-media-icon-beaver-builder-theme/

reddit orange #FF5700 International Orange

1 Like

You can also follow the steps here.

I’ve also made a note to add this to our docs. :slight_smile:

1 Like