{"id":275,"date":"2009-06-09T23:50:44","date_gmt":"2009-06-09T18:20:44","guid":{"rendered":"http:\/\/www.bin-co.com\/blog\/?p=275"},"modified":"2009-06-09T23:50:44","modified_gmt":"2009-06-09T18:20:44","slug":"a-tweet-this-button-for-each-post-in-wordpress-without-out-a-plugin","status":"publish","type":"post","link":"https:\/\/www.bin-co.com\/blog\/2009\/06\/a-tweet-this-button-for-each-post-in-wordpress-without-out-a-plugin\/","title":{"rendered":"A Tweet This Button for Each Post in WordPress &#8211; Without a Plugin"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bin-co.com\/blog\/wp-content\/uploads\/2009\/03\/wordpress.jpg\" alt=\"WordPress Metal Logo\" title=\"WordPress Metal Logo\" width=\"300\" height=\"300\" class=\"aligncenter size-full wp-image-239 intro\" align=\"right\" \/><\/p>\n<p class=\"intro\"><a href=\"http:\/\/richardxthripp.thripp.com\/tweet-this\">TweetThis<\/a> is a WordPress Plugin that &#8216;adds a Twitter link to every post and page, so your readers can share your blog entries on their Twitter accounts with ease.&#8217; And in the tradition of my <a href=\"http:\/\/www.bin-co.com\/blog\/2009\/03\/wordpress-plugin-killer-series\/\">WordPress Plugin Killer Series<\/a>, this post will show you how to do it without a plugin.<\/p>\n<h2>The Code<\/h2>\n<p>You can <strong class=\"highlight\">add twitter button to your post by editing the <code>single.php<\/code><\/strong> file in your theme. Go to the place in the file where you want the button to show up &#8211; then add this code at that location&#8230;<\/p>\n<pre><code class=\"javascript\">&lt;a href=\"http:\/\/twitter.com\/?status=&lt;?php echo urlencode(the_title('','', false)) ?&gt;+-+&lt;?php the_permalink() ?&gt;\"&gt;Tweet This&lt;\/a&gt;<\/code><\/pre>\n<p>This is a super simple way of doing it &#8211; <strong class=\"highlight\">with a little more code, you can use a URL shortner<\/strong> to &#8216;shortify&#8217; your permalink. Otherwise it might overflow the 140 char limit.<\/p>\n<h2>Twitter<\/h2>\n<p>By the way, if you are on twitter, add me &#8211; I&#8217;m <a href=\"http:\/\/twitter.com\/binnyva\">@binnyva<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p><a href=\"http:\/\/richardxthripp.thripp.com\/tweet-this\">TweetThis<\/a> is a WordPress Plugin that &#8216;adds a Twitter link to every post and page, so your readers can share your blog entries on their Twitter accounts with ease.&#8217; And in the tradition of my <a href=\"http:\/\/www.bin-co.com\/blog\/2009\/03\/wordpress-plugin-killer-series\/\">WordPress Plugin Killer Series<\/a>, this post will show you how to do it without a plugin.<\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,31],"tags":[69,213,251,292,304],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-php","category-wordpress","tag-button","tag-plugin-killer","tag-series","tag-twitter","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":0,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bin-co.com\/blog\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}