Search
 
SCRIPT & CODE EXAMPLE
 

PHP

share wordpress post on whatsapp without plugin

<?php $url = urlencode(get_the_permalink()); $title = htmlspecialchars(urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8'); ?>
 
<div class='social-share'>
<a class='fb' target="_blank" href="http://www.facebook.com/sharer.php?u=<?php echo $url;?>">Facebook</a>
<a class='tw' target="_blank" href="https://twitter.com/intent/tweet?url=<?php echo $url;?>&text=<?php echo $title; ?>">Twitter</a>
<a class='pi' href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());">Pinterest</a>
<a class='go' target="_blank" href="https://plus.google.com/share?url=<?php echo $url;?>">Google+</a>
<a class='li' target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $url;?>">Linkedin </a>
<a class='wh' href="whatsapp://send?text=<?php echo ($title ." ". $url);?>">WhatsApp</a>
<a class='ma' target="_blank" href="mailto:?subject=<?php echo $title;?>&body=%20<?php echo $url;?>">EMAIL</a>
</div>
Comment

PREVIOUS NEXT
Code Example
Php :: string and number laravel faker 
Php :: pretty json php 
Php :: APP_DEBUG is set to true while APP_ENV is not local 
Php :: laravel route contains particular segment 
Php :: wp_login_form wrong password redirect 
Php :: check if variable is set and not empty laravel 
Php :: foreach date php 
Php :: symnfony bearer token 
Php :: laravel pluck example 
Php :: laravel get from model first 
Php :: implode example in php 
Php :: delete button laravel 
Php :: declare empty array in php 
Php :: php ip log 
Php :: wordpress image size name 
Php :: connect sql server php 
Php :: Get wordpress posts by category name..! 
Php :: autoload_namespaces.php failed to open stream: Permission denied 
Php :: php artisan route list does not show all my routes 
Php :: show images laravel 8 showJobImage($filename) 
Php :: Termlaravel validation exists array rules 
Php :: recursive binary search php 
Php :: composer create new laravel project 
Php :: select option in laravel 
Php :: unique key value array php 
Php :: php cookies 
Php :: random integer in php 
Php :: country code validation in laravel 
Php :: convert multdimentional array in array in php 
Php :: how to make core controller codeigniter 3 more than 1 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =