Results

See more...

Manually Add Social Bookmarking Links In WordPress

If you don't want to use any social bookmarking plugin for your WordPress blog then there is a manual way of adding these links too. Obviously you can place these links anywhere you want, either at the end of your post or even in your sidebar. You may customize these links using your CSS in any way you want.

Create a file named bookmarks.php and place it in your theme folder. Use the following code for each bookmarking service.

StumbleUpon

<a href="http://stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>">StumbleIt</a>

Digg

<a href="http://digg.com/submit?phase=2&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>">Digg</a>

Reddit

<a href="http://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>">Reddit</a>

Twitter

<a href="http://twitter.com/home?status=Currently+Reading+<?php the_permalink(); ?>">Tweet</a>

Facebook

<a href="http://facebook.com/share.php?u=<?php the_permalink(); ?>">Facebook</a>

Technorati

<a href="http://technorati.com/faves?add=<?php the_permalink(); ?>">Technorati</a>

Delicious

<a href="http://del.icio.us/post?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>">Delicious</a>

Ping.fm

<a href="http://ping.fm/ref/?method=default&title=<?php the_title(); ?>&link=<?php the_permalink(); ?>">Ping.fm</a>

SlashDot

<a href="http://slashdot.org/submit.pl?url=<?php the_permalink(); ?>&subj=<?php the_title(); ?>&from=badge&email=YourEmail@domain.com&name=YourDomainName">Slashdot</a>

Now include bookmarks.php in the loop where you want to show these bookmarking links. If you want to add them to your homepage then you may edit your main index.php
else edit single.php to show these links at the end of your each post.

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(''); ?>
<?php include('bookmarks.php'); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

Contact Us for News Tips, Corrections and Feedback

Related posts

0 comments
Leave a message...