{"id":7175821,"date":"2016-03-16T05:10:43","date_gmt":"2016-03-16T05:10:43","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/not-working-inside-foreach\/"},"modified":"2016-08-31T14:44:01","modified_gmt":"2016-08-31T14:44:01","slug":"not-working-inside-foreach","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/not-working-inside-foreach\/","title":{"rendered":"Not working inside foreach"},"content":{"rendered":"<p>I created a separate page for posts and i used foreach.<\/p>\n<p>How can i display the sharing buttons inside the foreach??<\/p>\n<p>Example.<br \/>\nBelow is a code from another plugin &#8220;addthis&#8221;<br \/>\nand they used this.<\/p>\n<p>do_action(&#8216;addthis_widget&#8217;,get_permalink($post-&gt;ID), get_the_title($post-&gt;ID), &#8216;below&#8217;);<\/p>\n<p>For addtoany plugin, how can i do this?<\/p>\n<p>https:\/\/wordpress.org\/plugins\/add-to-any\/<\/p>\n","protected":false},"template":"","class_list":["post-7175821","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7175821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7175821\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7175821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}