• Resolved aelkhoury

    (@aelkhoury)


    I’m trying to replace a couple of the social icons with ones that I made myself. It seems to be more difficult than just replacing the .png file.

    For example, I replaced the soundcloud.png file in /images/social/ with my own image, and when I create a social link for it, the original soundcloud image appears. What do I have to do to make mine appear instead?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi aelkhoury,

    Could you please post a link to the page where the social icons are being displayed?

    Thanks!

    Hello aelkoury and Maria,
    The icons are actually displayed using font awesome.
    The social icon folder is just redundant at the moment. It was used in the theme before but now it is completely done using font awesome.

    So, replacing an icon is a bit more complicated here….
    You can use any of the icons in the following link-
    https://fortawesome.github.io/Font-Awesome/icons/

    Hi divjotsingh_440,
    I had gathered that FontAwesome was involved by looking at the theme demo site. However, I got confused by aelkoury mentioning an image icon and the filepath to it. That’s why I asked for the URL of the site.

    Cheers!

    Thread Starter aelkhoury

    (@aelkhoury)

    Ahh ok. So, besides changing the $s and $t values for whatever I want to change in social.php, where else do I need to modify the theme?

    After changing the variable name in $s and $t, you also need to change the customizer settings in functions.php.
    E.g. – If you want to add a camera icon instead of facebook icon, find out the following code in functions.php-

    $wp_customize-> add_setting(
        'facebook',
        array(
        	'default'	=> '',
        	'sanitize_callback' => 'esc_url_raw',
        	)
        );
    
        $wp_customize-> add_control(
        'facebook',
        array(
        	'label'		=> __('Facebook URL','klean'),
        	'section'	=> 'klean_social',
        	'type'		=> 'text',
        	)
        );

    Replace the “facebook” with the new icon’s name, in this case “camera”.

    And obviously, replace the text “Facebook URL” with whatever you want.

    Thread Starter aelkhoury

    (@aelkhoury)

    works like a charm, thank you so much!

    Jess

    (@chibiunicorn)

    Hi @divjotsingh_440 and everyone else,

    I was wondering how it’s possible to add a brand new social media icon (without replacing any), such as that of “Bandcamp”? I tried to modify my child’s social.php and also use your code for my child’s functions.php, and no luck. Let me know what I should do.

    Thanks!

    Hi Jess,
    I guess the attempt didn’t work because the Bandcamp icon is not present in the FontAwesome icons that your theme supports. If you want to know which icons FontAwesome offers, visit their website here:

    https://fontawesome.io/icons/

    If you know where to get icon fonts that offer what you’re after, it might be possible to adapt your theme so that it can be displayed.

    Jess

    (@chibiunicorn)

    Hi,

    That makes sense, especially since last night I noticed that there weren’t any Bandcamp icons on the fontawesome website.

    What if I just use the Bandcamp icon as a png file and leave all the other icons as it is (which are using fontawesome)? How would I change the code to that?

    Or, how could I go about it to use the icon on pictonic?
    https://pictonic.co/icon/bandcamp

    Thanks!

    Hello Jess,
    Currently, only font awesome icons can be used.
    Including some other icons requires a decent amount of coding.

    It can be considered in future updates…

    Jess

    (@chibiunicorn)

    Hello @divjotsingh_440,

    It’s alright. I decided to add a headphones as “Listen” from fortawesome to represent Bandcamp. It works fine!

    Thanks everyone!

    So, there is no way to add Imdb icon?
    https://www.imdb.com/

    If there is an actor’s portfolio, it is very useful…I need to add it now, and I don’t know how to do it. Please help, if there is a way…

    Best Regards!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Social Icons’ is closed to new replies.