• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Trying to add multiple Font Awesome Icons to functions.php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Trying to add multiple Font Awesome Icons to functions.php

This topic is: resolved

Tagged: functions, php, social icon

  • This topic has 1 reply, 2 voices, and was last updated 6 years, 5 months ago by mburleson.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 1, 2016 at 8:28 pm #194088
    ClaireSempf
    Member

    Hi everyone!

    I was just wondering if anyone could tell how to add multiple social media icons from font awesome to my functions.php.

    add_filter( 'storm_social_icons_networks', 'storm_social_icons_networks');
    function storm_social_icons_networks( $networks ) {

    $extra_icons = array (
    'http://instagram.com' => array( // Enable this icon for any URL containing this text
    'name' => 'Instagram', // Default menu item label
    'class' => 'instagram', // Custom class
    'icon' => 'icon-instagram', // FontAwesome class
    'icon-sign' => 'icon-instagram-sign' // May not be available. Check FontAwesome.
    ),
    );

    $extra_icons = array_merge( $networks, $extra_icons );
    return $extra_icons;

    }

    add_filter( 'storm_social_icons_networks', 'storm_social_icons_networks');
    function storm_social_icons_networks( $networks ) {

    $extra_icons = array (
    'http://bloglovin.com' => array( // Enable this icon for any URL containing this text
    'name' => 'Bloglovin', // Default menu item label
    'class' => 'heart', // Custom class
    'icon' => 'icon-heart', // FontAwesome class
    'icon-sign' => 'icon-heart-sign' // May not be available. Check FontAwesome.
    ),
    );

    $extra_icons = array_merge( $networks, $extra_icons );
    return $extra_icons;

    }

    What do I have to change or add to make this work?? Please Help

    http://local
    October 2, 2016 at 2:32 am #194122
    mburleson
    Member

    add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
    function enqueue_font_awesome() {
    wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css' );
    }

    and then add the class wherever you want the icon to appear. 🙂


    I Spread Happiness with Creativity and Code!
    http://MeganBurleson.com

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble