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

    hi:

    social-sharing-add-another-service’s code and custom-social-icons’s code can not use it?

    last time , i have 3 problem Been helped engineer,thanks very much again~

    link is:

    https://kriesi.at/support/topic/how-to-addingchange-social-icons-and-share-links%EF%BC%9F/

    so,my code is,this code is in my child theme fauctions.php,does not work

    
    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
        $icons['wechat']	 = array( 'font' =>'wechat', 'icon' => 'ue821');
    	$icons['weibo']		 = array( 'font' =>'weibo', 'icon' => 'ue826');
    	$icons['baidu']		 = array( 'font' =>'baidu', 'icon' => 'ue822');
        $icons['qq']		 = array( 'font' =>'qq', 'icon' => 'ue824');
        $icons['renren']		 = array( 'font' =>'renren', 'icon' => 'ue827');
        $icons['qweibo']		 = array( 'font' =>'qweibo', 'icon' => 'ue823');
    	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['wechat']	 = 'wechat';
    	$icons['weibo']		 = 'weibo';
    	$icons['baidu']		 = 'baidu';
        $icons['qq']		 = 'qq';
        $icons['renren']		 = 'renren';
        $icons['qweibo']		 = 'qweibo';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
    //在社交图标选项中新增选项20151128-Register new icon as a theme icon
    add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
    	$args['wechat'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.jiathis.com/send/?webid=weixin&url=[permalink]&title=[title]&uid=1561992");
        $args['weibo'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.jiathis.com/send/?webid=tsina&url=[permalink]&title=[title]&uid=1561992");
        $args['baidu'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.jiathis.com/send/?webid=baidu&url=[permalink]&title=[title]&uid=1561992");
        $args['qq'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.jiathis.com/send/?webid=cqq&url=[permalink]&title=[title]&uid=1561992");
        $args['renren'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.jiathis.com/send/?webid=renren&url=[permalink]&title=[title]&uid=1561992");
        $args['qweibo'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "http://www.jiathis.com/send/?webid=tqq&url=[permalink]&title=[title]&uid=1561992");
    	return $args;
    }
    function avia_add_custom_icon($icons) {
    	$icons['wechat']	 = array( 'font' =>'wechat', 'icon' => 'ue821');
    	$icons['weibo']		 = array( 'font' =>'weibo', 'icon' => 'ue826');
    	$icons['baidu']		 = array( 'font' =>'baidu', 'icon' => 'ue822');
        $icons['qq']		 = array( 'font' =>'qq', 'icon' => 'ue824');
        $icons['renren']		 = array( 'font' =>'renren', 'icon' => 'ue827');
        $icons['qweibo']		 = array( 'font' =>'qweibo', 'icon' => 'ue823');
    	return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    ?>
    
    #544902

    Hey ibolee!

    Sorry about the delayed response.

    I’m not sure what exactly you want to achieve. Are you trying to add another custom social icon?

    Cheers!
    Dake

    #545042

    1.How to add/change social icons and links? (it show in the website of the header and footer)

    2.how to add/change social icons and links ?(it show in under post share link)

    step1’s code and step2’s code Rejection occurred,For example, the code I listed above。

    #545217
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.