{"id":7043077,"date":"2016-02-08T23:35:14","date_gmt":"2016-02-08T23:35:14","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/incorporating-php-into-my-current-theme\/"},"modified":"2016-08-31T13:12:57","modified_gmt":"2016-08-31T13:12:57","slug":"incorporating-php-into-my-current-theme","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/incorporating-php-into-my-current-theme\/","title":{"rendered":"Incorporating PHP into my current theme"},"content":{"rendered":"<p>Can anyone help me by telling me where I should be pasting this code in my theme?  How could I incorporate this code into the plugin?<\/p>\n<p>&lt;?php<br \/>\nglobal $current_user;<br \/>\n$args = array(&#8216;user_id&#8217; =&gt; $current_user-&gt;ID);<br \/>\n$usercomment = get_comments($args);<br \/>\nif(count($usercomment) &gt;= 1){<br \/>\necho &#8216;disabled&#8217;;<br \/>\n} else {<br \/>\ncomment_form();<br \/>\n}<br \/>\n?&gt;<\/p>\n<p>I basically want the comment to not appear is usercomment &lt;=1<\/p>\n","protected":false},"template":"","class_list":["post-7043077","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7043077","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\/7043077\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7043077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}