{"id":1337,"date":"2010-08-31T16:40:38","date_gmt":"2010-08-31T22:40:38","guid":{"rendered":"http:\/\/www.evolutionarydesigns.net\/blog\/2010\/08\/31\/manually-install-digg-this-to-your-wordpress-theme\/"},"modified":"2010-09-12T13:22:47","modified_gmt":"2010-09-12T19:22:47","slug":"manually-install-digg-this-to-your-wordpress-theme","status":"publish","type":"post","link":"http:\/\/www.evolutionarydesigns.net\/blog\/2010\/08\/31\/manually-install-digg-this-to-your-wordpress-theme\/","title":{"rendered":"Manually Install Digg This to Your WordPress Theme"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2010\/08\/1283289719_097659digg2logosquare.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" style=\"display: inline; margin-left: 0px; margin-right: 0px; border-width: 0px;\" title=\"Building Traffic Through Digg!\" src=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2010\/08\/1283289719_097659digg2logosquare_thumb.png?resize=200%2C200\" border=\"0\" alt=\"Building Traffic Through Digg!\" width=\"200\" height=\"200\" align=\"left\" \/><\/a> Earlier today I finally came to the decision that I wanted to add a <a href=\"http:\/\/www.digg.com\" target=\"_blank\">Digg<\/a> submit button the post page of <a href=\"http:\/\/www.evolutionarydesigns.net.blog\" target=\"_blank\">Evolutionary Designs<\/a>. Originally I really didn\u2019t like the buttons, but after the redesign of the button and the site\u2019s new look, it grew on me. In the past I used <a href=\"http:\/\/www.evolutionarydesigns.net\/blog\/2010\/02\/27\/digg-digg-a-socialmedia-book-marking-and-voting-plugin-for-wordpress\/\" target=\"_blank\">Digg Digg<\/a> for Digg submission but the plugin did not look very good with my site\u2019s theme, and playing with code didn\u2019t seem to help.<\/p>\n<p>Rcently I tried to get Dig Dig To work on the site after the programmer updated and added a lot more features. But I did not like results. After not having success with Digg Digg and several other plugins, I decided to grab the <a href=\"http:\/\/www.javascript.com\/\" target=\"_blank\">JavaScript<\/a> and code the plugin directly to my post page like I did with <a href=\"http:\/\/mmosocialnetwork.com\" target=\"_blank\">MMO Social Network<\/a>, <a href=\"http:\/\/www.backtype.com\/widgets\/tweetcount\" target=\"_blank\">Twitter Submit<\/a>, and the <a href=\"http:\/\/www.stumbleupon.com\" target=\"_blank\">StumbleUpon<\/a> button.<\/p>\n<p>So earlier this morning, I went out and found the <a href=\"http:\/\/about.digg.com\/downloads\/button\/smart\" target=\"_blank\">Digg This Submit Button<\/a> on the the Digg website. I then added this code to the single.php file on my theme. Adding the button is really that hard. It should only take a few minutes. The only thing with this code is, it does not style it to work with your theme. You will have to decide where you want to put the button and know a little <a href=\"http:\/\/www.w3schools.com\/css\/css_intro.asp\" target=\"_blank\">CSS<\/a>.<\/p>\n<h2>How to Manually the Digg This Button<\/h2>\n<p>Of course, you can go to Digg\u2019s site and get the code, but their walk through is not complete and it can be a little confusing for a non coder. With this walk through, I try and break down and make it easy for anyone to do you. I will explain how and where to add the code. All you need to know is a little CSS if my example does not work, and little about <a href=\"http:\/\/www.wordpress.org'\" target=\"_blank\">WordPress<\/a> file structure.<\/p>\n<p>The first think you want to do is grab the JavaScript Code. Then decide what type of <a href=\"http:\/\/about.digg.com\/downloads\/button\/smart\" target=\"_blank\">button<\/a> you to want use. Then Code it. Or you can grab the code here, I have code for each button option for you to choose from<a href=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2010\/08\/IntegrateTheDiggButton.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" style=\"display: block; float: none; margin: 10px auto 0px; border-width: 0px;\" title=\"Digg This Button Options\" src=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2010\/08\/IntegrateTheDiggButton_thumb.png?resize=564%2C122\" border=\"0\" alt=\"Digg This Button Options\" width=\"564\" height=\"122\" \/><\/a><\/p>\n<h3>Compact<\/h3>\n<p>[javascript]&lt;a class=&quot;DiggThisButton DiggCompact&quot; href=&quot;http:\/\/digg.com\/submit?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;bodytext=&lt;?php the_excerpt(); ?&gt;&quot;&lt;\/a&gt;<\/p>\n<p>&lt;script src=&quot;http:\/\/widgets.digg.com\/buttons.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;  [\/javascript]<\/p>\n<h3>Medium<\/h3>\n<p>[javascript]<br \/>\n&lt;a class=&quot;DiggThisButton DiggMedium&quot; href=&quot;http:\/\/digg.com\/submit?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;bodytext=&lt;?php the_excerpt(); ?&gt;&quot;&lt;\/a&gt;<\/p>\n<p>&lt;script src=&quot;http:\/\/widgets.digg.com\/buttons.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;  [\/javascript]<\/p>\n<h3>Large<\/h3>\n<p>[javascript]<br \/>\n&lt;a class=&quot;DiggThisButton DiggLarge&quot; href=&quot;http:\/\/digg.com\/submit?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;bodytext=&lt;?php the_excerpt(); ?&gt;&quot;&lt;\/a&gt;<\/p>\n<p>&lt;script src=&quot;http:\/\/widgets.digg.com\/buttons.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;  [\/javascript]<\/p>\n<h3>Icon<\/h3>\n<p>[javascript]<br \/>\n&lt;a class=&quot;DiggThisButton DiggIcon&quot; href=&quot;http:\/\/digg.com\/submit?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;bodytext=&lt;?php the_excerpt(); ?&gt;&quot;&lt;\/a&gt;<\/p>\n<p>&lt;script src=&quot;http:\/\/widgets.digg.com\/buttons.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;   [\/javascript]<\/p>\n<h2>Adding The Code To WordPress<\/h2>\n<p>Once you have the code you will need to go to your admin <strong>dashboard &gt;&gt;&gt; appearance&gt;&gt;&gt; Editor&gt;&gt;&gt; Single.php.<\/strong> Once you have the filed pulled, copy the entire text to a word or notepad document and save it your desktop. This will be used as a backup, if you make any mistakes and can not find where the code was damaged. All you will have to do is remove the corrupted code (select all delete) and paste the original code back on the form.<\/p>\n<p><strong>BEFORE WE GO ANY FARTHER, BACK UP YOUR CODE!<\/strong><\/p>\n<p>Next We will need to decide where to put the code. In this example, I will put the code above content and floated right.\u00a0 In order to this we need to place the code just before the content. Take a look at the printscreen. You need to look for a line code that tells you are at the beginning of the post. You will need for something like main content. Once you find that, you should something below that says post. Below that is where you want to add the code.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2010\/08\/DiggThisCodePlacement.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"Digg This Code Placement\" src=\"https:\/\/i0.wp.com\/www.evolutionarydesigns.net\/blog\/wp-content\/uploads\/2010\/08\/DiggThisCodePlacement_thumb.png?resize=668%2C404\" border=\"0\" alt=\"Digg This Code Placement\" width=\"668\" height=\"404\" \/><\/a><\/p>\n<p>Here is the code I used to submit all of the voting buttons that are floated left. If you only want the Dig Code, then skip this part and grab the second set of code below<\/p>\n<p>[javascript]<br \/>\n&lt;!&#8211; backtype Code &#8211;&gt;<br \/>\n&lt;span style=&quot;margin: 0px 6px 0px 0px; float: Right;&quot;&gt;<br \/>\n&lt;div class=&quot;backtype_style&quot;&gt;<br \/>\n&lt;script type=&quot;text\/javascript&quot;&gt;<br \/>\n    tweetcount_url = &#8216;&lt;?php the_permalink() ?&gt;&#8217;;<br \/>\n    tweetcount_title = &#8216;&lt;?php the_title(); ?&gt;&#8217;;<br \/>\n    tweetcount_src = &#8216;RT @element321:&#8217;;<br \/>\n    tweetcount_via = false;<br \/>\n    tweetcount_links = true;<br \/>\n    tweetcount_size = &#8216;large&#8217;;<br \/>\n    tweetcount_background = &#8216;FFFFFF&#8217;;<br \/>\n    tweetcount_border = &#8216;CCCCCC&#8217;;<br \/>\n&lt;\/script&gt;<br \/>\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/widgets.backtype.com\/tweetcount.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/span&gt;<br \/>\n&lt;!&#8211; End of backtype &#8211;&gt;<\/p>\n<p>&lt;span style=&quot;margin: 0px 6px 0px 0px; float: Right;&quot;&gt;<br \/>\n&lt;script src=&quot;http:\/\/www.stumbleupon.com\/hostedbadge.php?s=5&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;\/span&gt;<\/p>\n<p>&lt;span style=&quot;margin: 0px 6px 0px 0px; float: Right;&quot;&gt;<br \/>\n&lt;script type=&quot;text\/javascript&quot;&gt;url_site='&lt;?php the_permalink(); ?&gt;&#8217;; &lt;\/script&gt;<br \/>\n&lt;script src=&quot;http:\/\/www.mmosocialnetwork.com\/sites\/all\/modules\/drigg_external\/js\/button.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;<br \/>\n    &lt;\/span&gt;<\/p>\n<p>   &lt;span style=&quot;margin: 0px 6px 0px 0px; float: Right;&quot;&gt;<br \/>\n   &lt;a class=&quot;DiggThisButton DiggMedium&quot; href=&quot;http:\/\/digg.com\/submit?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;bodytext=&lt;?php the_excerpt(); ?&gt;&quot;&lt;\/a&gt;<br \/>\n   &lt;script src=&quot;http:\/\/widgets.digg.com\/buttons.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;<br \/>\n   &lt;\/span&gt;<br \/>\n[\/javascript]<\/p>\n<p>The code I use to style Digg is below. This code should work with most themes.<\/p>\n<p>[javascript]<br \/>\n&lt;span style=&quot;margin: 0px 6px 0px 0px; float: Right;&quot;&gt;<br \/>\n   &lt;a class=&quot;DiggThisButton DiggMedium&quot; href=&quot;http:\/\/digg.com\/submit?url=&lt;?php the_permalink() ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;bodytext=&lt;?php the_excerpt(); ?&gt;&quot;&lt;\/a&gt;<br \/>\n   &lt;script src=&quot;http:\/\/widgets.digg.com\/buttons.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;<br \/>\n   &lt;\/span&gt;<br \/>\n[\/javascript]<\/p>\n<p>If not, then you will need to play with the margin. If you want to place it somewhere else then you will tell it float left. If you want at the bottom, the add the code the bottom of the code. You will need to add where it says \/!post. This will be easiest way to get this to work.<\/p>\n<h2>Conclusion<\/h2>\n<p>So far I am still testing the code and noticed a few things. One of those is, the code still reads as if there are no votes even if there are votes before the plugin was added. The button worked before Digg made major changes to their site. My guess the code will either be corrected or the issue will resolve its self over the next weeks. If doesn\u2019t resolve and stays this way, I will remvoe the plugin all together.<\/p>\n<p>In general I do not like plugins or submit buttons that show the number of submits and that is mainly because it slows my site down. So, if you have a lot of vote buttons, this could slow your load time. I would try and keep to no more than three buttons. In the future I will removing more of these buttons, if not all them.<\/p>\n<p>Image Source <a href=\"http:\/\/www.iconfinder.com\/icondetails\/54605\/128\/097659_digg2_logo_square_icon\" target=\"_blank\">Grunge Social Media Icons<\/a><\/p>\n<div class=\"zemanta-pixie\" style=\"margin-top: 10px; height: 15px;\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"zemanta-pixie-img\" style=\"border: medium none; float: right;\" src=\"https:\/\/i0.wp.com\/img.zemanta.com\/pixy.gif\" alt=\"\" \/><span class=\"zem-script pretty-attribution\"><script src=\"http:\/\/static.zemanta.com\/readside\/loader.js\" type=\"text\/javascript\"><\/script><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Earlier today I finally came to the decision that I wanted to add a Digg submit button the post page of Evolutionary Designs. Originally I really didn\u2019t like the buttons, but after the redesign of the button and the site\u2019s new look, it grew on me. In the past I used Digg Digg for Digg [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,14,9],"tags":[290,266,265,580,133,579,1484,1481,399],"class_list":["post-1337","post","type-post","status-publish","format-standard","hentry","category-evolutionary-designs","category-tutorials","category-wordpress","tag-cascading-style-sheets","tag-digg","tag-digg-digg","tag-digg-this","tag-javascript","tag-manually-install-digg-submit-buttons","tag-tutorials","tag-wordpress","tag-wordpress-themes","entry","has-post-thumbnail"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pJPdG-lz","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/posts\/1337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/comments?post=1337"}],"version-history":[{"count":0,"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/posts\/1337\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/media?parent=1337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/categories?post=1337"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.evolutionarydesigns.net\/blog\/wp-json\/wp\/v2\/tags?post=1337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}