Everything you need to use WP Theme Options

Dynamic Social Icons

Social Component

Illustrative image for the component output.

This element will work if you use FontAwesome on your WordPress Theme, it will return the class name of the social network (ex: “fa fa-facebook”) and the link. If you don’t want to use FontAwesome, you can use the class names for your own CSS styles.

Defining in the Array

To insert this component on the Theme Options you’ll need to put the following code in the file functions.array.php.

$fuse_options[] = array(
  'name' => __('Social Icons','textdomain'),
  'description' => __('Dynamic Social Icons with FontAwesome class names.','textdomain'),
  'id' => 'themeoptions_socialicons',
  'type' => 'social_icons'

How to use on your theme

Make sure you already defined the global variable in the file you want to use the Theme Options values (without this it won’t return the values):

global $fuseData;

After this, you just need to call the unique ID, for example:

foreach ($fuseData['themeoptions_socialicons']['icon'] as $key => $value) {
  echo '<a href="' . $fuseData['themeoptions_socialicons']['link'][$key] . '" class="' . $value . '"></a>';

Some ideas for you

This component can be used for multiple purposes, we highly recommend for this ones:

  • Social Networks Share Buttons
  • Social Networks on header / footer