Tos Web Developer provides insights, tutorials, and advice around topics including content strategy, design, Drupal Development, Drupal Custom Module Development, Drupal 8 Custom themes, PHP, Server, Twig, and more

WhatsApp share for mobile need to configure 

STEP 1:- Install Share This Module 


STEP 2:- Then go to this URL (admin/config/services/sharethis

change the button size.
Choose a button style: Large Chicklets






STEP 3:- After Selected Button style scrolls down and Choose Your Services. selection add Whatsapp icon further information check the below screenshot.)





STEP 3:- after added WhatsApp share in selected service check which content type do you need to show social sharing 





As you check we are selected blog post because we are showing social share to blog Post


STEP 4: All settings are Done Save the configuration.


STEP 5:- Clear Cache and check on the blog post page. (Final Output gives below.)




WhatsApp share for Desktop 

STEP 1:- copy file form this stage server :- \modules\contrib\sharethis\templates\sharethis-block.html.twig


STEP 2:- Past the same file on your current set Default Theme Folder given below path


/blog/themes/example_theme/templates/block  


STEP 3:- For Desktop WhatsApp share I have customized ShareThis-block.html.twig file Update the below code.


<div class="sharethis-wrapper">

  {% for span in content.st_spans %}

  {{ span }}

  {% endfor %}

  <span class="wp-desktop"><a href="https://web.whatsapp.com/send?text={{ url('<current>') }}"

      data-action="share/whatsapp/share" target="_blank"><span

        style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;"

        class="stButton hidden-sm hidden-xs hidden-md"><span class="stLarge"

          style="background-image: url(&quot;https://ws.sharethis.com/images/2017/whatsapp_32.png&quot;);"></span></span></a></span>

</div>


STEP 4:- After added code clear cache.

STEP 5:- Goto The blog post page and check on Bottom.




No comments:

Post a Comment

| Designed And Blog Post by www.toswebdeveloper.com