neverblueads logo MarketLeverage logo Hydra Network logo neverblueads logo
logo  

A discussion of earning with the Best Affiliate Programs, SEO, Wordpress Blogging and General Motivational Ideas for Internet Publishers and Affiliate Marketers.


feedburner

Blog Icon Wordpress Hack : Add a Digg Button to Your Posts

Posted in Blogs and Blogging by Dave on July 31st, 2007

Digg LogoI know there’s several available to add a “Digg It” button to your Wordpress blog, but I still prefer to add hacks in my Wordpress theme to accomplish the functionality without having to bother searching for, downloading and installing a Wordpress Plugin. As a webmaster with several Wordpress blogs and several different versions, I find it easier just to pop open my and edit the PHP code by hand. Here’s a quick and dirty way to add a “Digg It” button into your blog posts. It takes all of 5 minutes to complete. This example will add a Digg button like the one’s on this blog, in the upper left hand corner of every post. This will make it easier for your readers to Digg articles they like. It is advisable to place the “Digg It” button someplace easy for your readers to see so that they don’t have to do much searching to digg or review your articles.

Step 1: Open the file /wp-content/themes/*your-theme-name*/index.php and look for the following code:



Please note: the code may also look like this…


Either way you’re looking for the beginning of the post content output loop if you want your Digg It widget as it appears on this site in the upper left hand corner of every blog post.

Step 2: Add the following code directly before the code listed above.

****Please note (added 8/10/2007): If you’re having a problem copying and pasting this code from the blog, please go to this page to copy and paste the code…
http://www.affiliatebestprograms.com/Wordpress_digg_code.htm

Note: you can add it anywhere you want in your post loop. For example, if you want it on the right of every post all you have to do is change “float:left” to “float:right”. If you want the widget at he bottom of your posts, allyou have to do is add it after the code from step 1. Experiment with it and have fun.


About Digg
is a and bookmarking website that allows members to submit stories and have other people vote on them to increase you article’s popularity. If you can get an article dugg a lot of times, you will certainly be getting a lot of hits from Digg users. Digg is primarily technology oriented, however they have been expanding the service to include other types of articles. I would also advise against trying to cheat the Digg system by registering multiple accounts and digging your own stories because you will find yourself banned and all your stories removed.

There are additional ways to customize the look and feel of the Digg widget that are not covered in this article and if you’re interested in extending the functionality, visit the Digg Tools Page


If anybody has any questions about how to implement this code, feel free to post a comment here. If you are using this code in your blog, please post a comment with a link to your site so we can see it. We are a “dofollow” blog and we reward our commentors with backlinks for posting well written, intelligent comments.


Happy Publishing !!



Like this post? Subscribe to AffiliateBestPrograms RSS feed and never miss a post !!


del.icio.us:Wordpress Hack : Add a Digg Button to Your Posts  newsvine:Wordpress Hack : Add a Digg Button to Your Posts  furl:Wordpress Hack : Add a Digg Button to Your Posts  reddit:Wordpress Hack : Add a Digg Button to Your Posts  blogmarks:Wordpress Hack : Add a Digg Button to Your Posts  Y!:Wordpress Hack : Add a Digg Button to Your Posts  smarking:Wordpress Hack : Add a Digg Button to Your Posts  magnolia:Wordpress Hack : Add a Digg Button to Your Posts  segnalo:Wordpress Hack : Add a Digg Button to Your Posts  gifttagging:Wordpress Hack : Add a Digg Button to Your Posts




16 Responses to 'Wordpress Hack : Add a Digg Button to Your Posts'

Subscribe to comments with RSS

  1. Vishnu on August 2nd, 2007

    Great article, thanks, in the next article please elaborate on adding a reddit button.

  2. deborah on August 4th, 2007

    Thank you for creating and sharing this code. I discovered it through a Google search.

    I placed the code right before the and it does not show up. Are you able to see what I’m doing wrong?

    Thank you for any help you can provide.

  3. DLL Files Head on August 5th, 2007

    I know im gonna dig this… lol Im digin it man. Nice hack!

  4. Dave on August 6th, 2007

    Deborah,

    You need to replace the question marks with either single or double quotes. I’d suggest copy the code from the blog post into notepad or any text editor first and then copy and paste it into your blog.

    That will make it work. Wordpress is a pain in the butt to post code in a blog post, especially if people are copy and pasting it.

  5. Eric on August 8th, 2007

    This is exactly what I expected to find out after reading the title ress Hack : Add a Digg Button to Your Posts. Thanks for informative article

  6. What is Digg? on August 11th, 2007

    […] have a wordpress blog you can get a Digg it wordpress plugin. You can also get the Digg hack code here which is code to put the digg it button on any site. These Digg buttons will give a visual reminder […]

  7. infmom on August 11th, 2007

    I guess I’m not understanding how this works. Or maybe the Freshy theme is just incompatible with digg. :)

    I’ve tried putting this into the index several times–I must be doing something wrong but this is a bit beyond my coding capabilities! The question marks you refer to in the previous post, does that mean the code would be
    or then? Does the_permalink need to be changed to something else?

  8. Dave on August 11th, 2007

    Just make sure when you copy and paste all the quotation marks come out as regular quotes. Wordpress has a way of switching the quotes to begin quote and end quotes. I’m, trying to figure out how to work around it, but it seems to be a problem with the TinyMCE editor in wordpress.

    also, the

    tag at the end of the code needs to be removed. For some reason Wordpress is adding it to my post…

    I put the code in a regular html file in case anybody is having a problem…

    http://www.affiliatebestprograms.com/Wordpress_digg_code.html

  9. Terrance Charles on September 2nd, 2007

    I REALLY want to thank you guy, you really came through on this one, it’s so crazy because digg.com etc and those other big sites don’t even include this kind of information, it worked perfectly for me at TerranceCharles.com …

  10. simple67 on October 22nd, 2007

    […] the full story here No Comments so far Leave a comment RSS feed for comments on this post. TrackBack URI […]

  11. BB King on November 14th, 2007

    Hi…Man i love reading your blog, interesting posts ! it was a great Wednesday

  12. Lindsey Harper on November 17th, 2007

    Hi,

    I added the hack, but I noticed it’s not digging the individual story, but my whole blog? how do I set it up so it diggs the story and not the complete blog?

  13. Dave on November 17th, 2007

    hi Lindsey,
    It seems to be working when I check the blog. One thing, you should enable permlinks on your blog. Enabling permalinks is simple, just go into your Dashboard > Options > Permalinks

    You have a few options but I’d recommend selecting “Date and name based” and click “Update Permalink Structure” to enable them.

    What permalinks do is it re-writes your blog post URL’s to more search engine friendly urls. For example, your most recent post’s url

    http://lindseyharper.net/?p=34

    Would be rewritten to

    http://lindseyharper.net/2007/11/17/Seattle-Mariners-Ball-Girl-Behind-the-Back-Catch-Picture-of-the-Week-Dateline/

    You’ll notice the majority of blogs that get indexed heavily by Google use a permalink structure as opposed to the ?p=xxx structure

  14. Paul Walsh on January 7th, 2008

    This is a useful hack. I will keep this in mind and probably will try it out on our blog.

  15. Steinar Sund on January 26th, 2008

    Great tips that is useful for all bloggers. Thank you

  16. cuzzy on April 11th, 2008

    hi thanks for making it easier to do than most posts out there.

    I got it working but one question.

    is there a way to make the badge/button just a little bit smaller?

    because of the size of the header image I have always used, it just is not fitting perfectly with all of the older posts.

    if not I will just have to make the image a little smaller from now on.

    thank you again.






Categories
Archives

Coming Soon: Affiliate Traffic Generator | Affiliate Directory | Affiliate Software | Affiliate Tools

Resdaz Media
AffiliateBestPrograms © 2007-20009 Resdaz Media
All Rights Reserved
Other Resdaz Media Network Sites:
Add to Technorati Favorites

BRDTracker BlogsByCategory.com
Find the best blogs at Blogs.com. feeds4all

Blogoculars Blog Directory