Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #737972

    I’ve successfully added one social profile icon using this documentation article: http://kriesi.at/documentation/enfold/custom-social-icons/ so here’s my code so far:

    // WIEBO - Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['icon_name']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue92b');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    // Add new icon as an option for social icons
    function avia_add_custom_social_icon($icons) {
    	$icons['Weibo'] = 'icon_name';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    And now I’d like to add more icons. How would that code look?

    Font: fontawesomeregular
    Label: QQ
    Icon: uf1d6

    Font: fontawesomeregular
    Label: WeChat
    Icon: uf1d7

    #739694

    Hi Julie!

    Thank you for using Enfold.

    Please use the following code.

    // WIEBO - Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['weibo']	 = array( 'font' =>'fontawesomeregular', 'icon' => 'ue92b');
    	$icons['qq']	 = array( 'font' =>'fontawesomeregular', 'icon' => 'ue92b');
    	$icons['wechat']	 = array( 'font' =>'fontawesomeregular', 'icon' => 'ue92b');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    // Add new icon as an option for social icons
    function avia_add_custom_social_icon($icons) {
    	$icons['Weibo'] = 'weibo';
    	$icons['QQ'] = 'qq';
    	$icons['WeChat'] = 'wechat';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    Adjust the “icon” value.

    Regards,
    Ismael

    #740901

    Awesome! Gracias. So with a few tweaks, this is the code that worked for me.

    // WIEBO - Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['weibo']	 = array( 'font' =>'entypo-fontello', 'icon' => 'ue92b');
    	$icons['qq']	 = array( 'font' =>'fontawesomeregular', 'icon' => 'uf1d6');
    	$icons['wechat']	 = array( 'font' =>'fontawesomeregular', 'icon' => 'uf1d7');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    // Add new icon as an option for social icons
    function avia_add_custom_social_icon($icons) {
    	$icons['Weibo'] = 'weibo';
    	$icons['QQ'] = 'qq';
    	$icons['WeChat'] = 'wechat';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
    #740995

    Hey!

    Great! Thanks for sharing. Let us know if you have more questions.

    Cheers!
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Enfold – Add multiple social profile icons’ is closed to new replies.