{"id":7546075,"date":"2016-07-05T16:44:39","date_gmt":"2016-07-05T16:44:39","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-shortcode-15\/"},"modified":"2016-09-01T16:18:32","modified_gmt":"2016-09-01T16:18:32","slug":"php-shortcode-15","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-shortcode-15\/","title":{"rendered":"PHP Shortcode"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I&#8217;ve recently installed the BestWebSoft Google +1 and Facebook Like plugins. I wanted to insert them in specific locations on my various sites and came across <a href=\"https:\/\/wordpress.org\/support\/topic\/is-there-any-php-shortcode-you-can-use-for-the-homepage\">this post<\/a> where a nice solution is offered for the Google +1 button. Essentially, the shortcode could be inserted into a PHP\/HTML template file and the all of the boxes in the &#8220;Show Button&#8221; area could be unchecked so that only one instance of the button would appear. Is there a similar solution for the Facebook Like button plugin?<\/p>\n<p>The shortcode certainly works fine:<\/p>\n<p><code>&lt;?php echo do_shortcode(&#039;[fb_button]&#039;); ?&gt;<\/code><\/p>\n<p>However, I&#8217;m not able to hide the first instance of the button since the FB plugin doesn&#8217;t seem to offer the same &#8220;Show Button&#8221; options (i.e., there&#8217;s nothing to uncheck). As a temporary measure, I&#8217;ve hidden one of the buttons with CSS:<\/p>\n<p><code>.fcbk_share:first-of-type { display: none; }<\/code><\/p>\n<p>However, this isn&#8217;t ideal since the button will still need to load twice. It would be much better if I could simply turn off the display options for the FB button (as was done for the G+1 button) so that the PHP insertion would be the only instance displayed.<\/p>\n<p>Any suggestions you have would be greatly appreciated.<\/p>\n<p>Thank you,<br \/>\nJP<\/p>\n<p>https:\/\/wordpress.org\/plugins\/facebook-button-plugin\/<\/p>\n","protected":false},"template":"","class_list":["post-7546075","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7546075","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\/7546075\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7546075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}