tr_social_share

{tr_social_share($soc_name)}

Generates a social media share link

Takes one of these four string options: 'facebook' | 'twitter' | 'linkedin' | 'pinterest' | 'email' as an argument, and prints the link for sharing the current page.

Example

Here we are passing 'facebook' as an argument. (Let’s assume we are on a “https://website.com/page/” page of our website)

<a href="{tr_social_share('facebook')}">
  Share to Facebook
</a>

and it generates this piece of HTML for us:

<a 
  href="https://www.facebook.com/sharer/sharer.php?u=https://website.com/page/"
>
  Share to Facebook
</a>
Join Our Newsletter

To get updates about Theme Redone