social media bookmark in wordPress without javascript

social media bookmark in wordpress without javascript

All scripts and social media plugin add extra javascript code to site. I have best solution for adding social media bookmark in wordpress without javascript.

social media bookmark in wordpress without javascript

I used many types for social bookmark plugins for sharing the content. I tried a some best services like those provided by AddThis and ShareThis. All the scripts and social media bookmarks are adding the some extra javascript code to website. Some social media buttons will add the swf/ flash code to website which to too heavy. So Adding the multiple javascript files for each social media bookmark is not a good solution.

My suggestion is, use anchor links with parameters added to the href attribute (which is basically what you get anyway once those JavaScripts have done their work).

Following code are important in wordpress for sharing the content to social media sites:
<?php the_title(); ?> // It will return the Post/Article Title
<?php the_permalink(); ?> // It will return the Post/Article Permalink or URL
<?php the_excerpt(); ?> // It will return the Post/Article Description
<?php the_post_thumbnail(); ?> // It will return the Post/Article Thumbnail Image

For Facebook: social media bookmark in wordpress without javascript

Facebook Share

<a href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php the_title(); ?>&amp;p[summary]=<?php the_excerpt(); ?>&amp;p[url]=<?php the_permalink(); ?>&amp;&p[images][0]=<?php the_post_thumbnail(); ?>"><img src="http://images.purabtech.in/facebook_32.png" title="Facebook" alt="Facebook" /></a>

For Twitter: social media bookmark in wordpress without javascript

Twitter Share

<a href="https://twitter.com/share" class="twitter-share-button" data-text="some description goes here.some description goes here.some description goes here.some description goes here.some description goes here." data-url="https://purabtech.in/create-install-script-drupal-module-create-tables/" data-related="anywhere:The Javascript API" data-via="purab">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

For Google plus: social media bookmark in wordpress without javascript

Google Plus

<a href="https://plus.google.com/share?url=http://54.214.47.229/test2.html?desc=foobar" onclick="javascript:window.open(this.href,
 '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img
 src="https://www.gstatic.com/images/icons/gplus-64.png" alt="Share on Google+"/></a>

For Linked in: social media bookmark in wordpress without javascript

Linked In Share

<a rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>&amp;source=<?php bloginfo('pingback_url'); ?>&amp;ary=<?php the_excerpt(); ?>" title="LinkedIn">
<img src="http://images.purabtech.in/linkedin_32.png" title="LinkedIn" alt="LinkedIn" /></a>

For delicious: social media bookmark in wordpress without javascript

Delicious Bookmark

<a rel="nofollow" target="_blank" href="http://del.icio.us/post?url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>" title="del.icio.us"><img src="http://images.purabtech.in/delicious_32.png" title="del.icio.us" alt="del.icio.us" /></a>

For Stumbleupon: social media bookmark in wordpress without javascript

Stumbleupon Share

<a rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>" title="StumbleUpon"><img src="http://images.purabtech.in/stumbleupon_32.png" title="StumbleUpon" alt="StumbleUpon" /></a>

For Digg: social media bookmark in wordpress without javascript

Digg Share

<a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>" title="Digg"><img src="http://images.purabtech.in/digg_32.png" title="Digg" alt="Digg" /></a>

For Pinterest: social media bookmark in wordpress without javascript

Pin It

<a href="//www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F&media=http%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg&description=Next%20stop%3A%20Pinterest" data-pin-do="buttonPin" data-pin-config="above"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>

For Mixx: social media bookmark in wordpress without javascript

Mixx Share

<a rel="nofollow" target="_blank" href="http://www.mixx.com/submit?page_url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>" title="Mixx"><img src="http://images.purabtech.in/mixx_32.png" title="Mixx" alt="Mixx" />

For Reddit: social media bookmark in wordpress without javascript

Reddit Share

<a rel="nofollow" target="_blank" href="http://reddit.com/submit?url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>" title="Reddit"><img src="http://images.purabtech.in/reddit_32.png" title="Reddit" alt="Reddit" /></a>

For Mail: social media bookmark in wordpress without javascript

Mail to

<a rel="nofollow" target="_blank" href="mailto:?subject=<?php echo urlencode(the_title('','', false)) ?>&amp;body=<?php the_permalink() ?>" title="E-mail this story to a friend!">
<img src="http://images.purabtech.in/email_32.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!" /></a>

For RSS feed: social media bookmark in wordpress without javascript

RSS feed

<a rel="nofollow" target="_blank" href="https://purabtech.in/feed" title="RSS">
<img src="http://images.purabtech.in/rss_32.png" title="RSS" alt="RSS" /></a>
social media bookmark in wordPress without javascript
social media bookmark in wordPress without javascript

I used following URL as reference.
How to Add the social Bookmark Icons in WordPress theme without wordpress plugins

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.