Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1046554

    Hi,

    This is an update for this thread:https://kriesi.at/support/topic/add-whatsapp-icon/#post-532969
    In there there is a solution for adding the WhatsApp icon to the header social follow items and to the social sharing icons.
    2 things didn’t work for me.
    1. The link whatsapp://send?text=[title]-[permalink] doesn’t work on desktop. When I changed it to https://api.whatsapp.com/send?text=%5Btitle%5D-%5Bpermalink%5D it works on mobile and desktop also.
    2. When you add the CSS markup to the Quick CSS section the styling is not being handled. When you add !important to both CSS styles it does work.

    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['whatsapp']	 = array( 'font' =>'whatsapp-font-icon', 'icon' => 'ue800');
    	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['Whatsapp'] = 'whatsapp';
    	return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
    
    //Add items on the social share section
    add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
    	$new_array = array(
    		'whatsapp' => array(
    			"encode"=>true, "encode_urls"=>false, "pattern" => "https://api.whatsapp.com/send?text=[title]-[permalink]"
    		)
    	);
    
    	return array_merge($new_array, $args);
    }

    3. If you don’t have a child theme functions.php, install this plugin
    and add the code from step 2 into the functions.php added by the plugin.
    4. Add this to your Quick CSS to change the whatsapp-button color.

    /* Whatsapp button color */
    #top #wrap_all .av-social-link-whatsapp:hover a {
    color: #fff !important;
    background-color: #3bb528 !important;
    }

    Hope this helps.

    #1048588

    Hey ngb-AndreKoppies,

    Thank you for sharing the update with the community :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

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