{"id":840,"date":"2012-10-13T23:58:22","date_gmt":"2012-10-13T21:58:22","guid":{"rendered":"http:\/\/www.kavdesign.net\/blog\/?p=840"},"modified":"2012-10-13T23:58:50","modified_gmt":"2012-10-13T21:58:50","slug":"how-to-add-social-sharing-buttons-to-a-list-of-wordpress-posts-on-an-index-page-or-category-page-with-no-plugins","status":"publish","type":"post","link":"https:\/\/www.kavdesign.net\/blog\/wordpress\/how-to-add-social-sharing-buttons-to-a-list-of-wordpress-posts-on-an-index-page-or-category-page-with-no-plugins\/","title":{"rendered":"How to Add Social Sharing Buttons to a List of WordPress Posts on an Index Page or category page with No Plugins"},"content":{"rendered":"<h2>Facebook Like Buttons for WordPress Loops<\/h2>\n<ol>\n<li><a href=\"http:\/\/developers.facebook.com\/docs\/reference\/plugins\/like\/\" rel=\"external\" target=\"_blank\">Go to the official Facebook page for creating buttons<\/a>.<\/li>\n<li>For the <strong>URL to Like<\/strong> field, just enter in your website\u2019s main URL for now, something like <em>http:\/\/yourwebsite.com<\/em>. You can set any of the other settings as you\u2019d like.<\/li>\n<li>Click <strong>Get the Code<\/strong> and choose <strong>IFRAME<\/strong> as the type of code you want to use.<\/li>\n<li>Copy and paste the providing code into your theme where you want the button to appear.<\/li>\n<li>Before saving, look through the code for the text \u201chttp:\/\/%3A%2F%2Fyourwebsite.com\u201d, as highlighted in the example below:\n<div><code>&lt;iframe src=\"\/\/www.facebook.com\/plugins\/like.php?href=<mark>http%3A%2F%2Fyourwebsite.com<\/mark>&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:450px; height:80px;\" allowTransparency=\"true\"&gt;&lt;\/iframe&gt;<\/code><\/div>\n<\/li>\n<li>Replace that entire highlighted section with &lt;?php the_permalink(); ?&gt;<\/li>\n<\/ol>\n<p>And tooty fruity oh rudy you\u2019re all set for Facebook. What we did there was used WordPress\u2019 <code>the_permalink()<\/code> function to set the URL instead of the one Facebook asks us to manually enter.<\/p>\n<p>&nbsp;<\/p>\n<p>Full article:<\/p>\n<p><a href=\"http:\/\/clicknathan.com\/web-design\/how-to-add-social-sharing-buttons-to-a-list-of-wordpress-posts-on-an-index-page-with-no-plugins\/\" target=\"_blank\">http:\/\/clicknathan.com\/web-design\/how-to-add-social-sharing-buttons-to-a-list-of-wordpress-posts-on-an-index-page-with-no-plugins\/<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Facebook Like Buttons for WordPress Loops Go to the official Facebook page for creating buttons. For the URL to Like field, just enter in your&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/www.kavdesign.net\/blog\/wordpress\/how-to-add-social-sharing-buttons-to-a-list-of-wordpress-posts-on-an-index-page-or-category-page-with-no-plugins\/\">Continue reading<span class=\"screen-reader-text\">How to Add Social Sharing Buttons to a List of WordPress Posts on an Index Page or category page with No Plugins<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[82],"tags":[],"class_list":["post-840","post","type-post","status-publish","format-standard","hentry","category-wordpress","entry"],"_links":{"self":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/comments?post=840"}],"version-history":[{"count":2,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/840\/revisions"}],"predecessor-version":[{"id":842,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/840\/revisions\/842"}],"wp:attachment":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/media?parent=840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/categories?post=840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/tags?post=840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}