Tagged: social share buttons, whatsapp
There is a thread on adding a WhatsApp sharing button (https://kriesi.at/support/topic/adding-whatsapp-button-on-social-share-buttons/). However, the share URL isn’t correct, you need to change the $args['whatsapp']
in the avia_add_social_share_link_arguments function:
//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)
{
$args['whatsapp'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "https://whatsapp.com/share?text=[title]&url=[permalink]", 'label' => __("Share on Whatsapp",'avia_framework'));
return $args;
}
to
//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)
{
$args['whatsapp'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "whatsapp://send?text=[title]&url=[permalink]", 'label' => __("Share on Whatsapp",'avia_framework'));
return $args;
}
Whereas whatsapp://send? is the WhatsApp URI.
Hey Jan!
Thank you for the heads up! We will share this thread if needed. :)
Best regards,
Ismael