{"id":8560068,"date":"2016-12-16T14:05:27","date_gmt":"2016-12-16T14:05:27","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/exclude-plugin-on-posts-pages\/"},"modified":"2016-12-16T14:05:27","modified_gmt":"2016-12-16T14:05:27","slug":"exclude-plugin-on-posts-pages","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/exclude-plugin-on-posts-pages\/","title":{"rendered":"exclude plugin on posts &amp; pages"},"content":{"rendered":"<p>Hi, I have a wordpress site, and using the shortcode below in the header to insert a plugin:<\/p>\n<p>&lt;?php echo do_shortcode( &#8216;[ois skin=&#8221;4&#8243;]&#8217; ); ?&gt;<\/p>\n<p>I want to exclude the plugin on certain pages &amp; posts. The developer provided me with the following code, with the array being the posts\/pages to exclude. But it isn&#8217;t working, and adds the plugin instead of removing it.<\/p>\n<p>&lt;?php<br \/>\n\/\/IDs of the types where this Skin will not appear<br \/>\n$not_allowed = array(1,2,3);<br \/>\nif (!in_array(get_post_type(), $not_allowed ))<br \/>\necho do_shortcode( &#8216;[ois skin=&#8221;4&#8243;]&#8217; );<br \/>\n?&gt;<\/p>\n<p>Any suggestions?<\/p>\n","protected":false},"template":"","class_list":["post-8560068","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8560068","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\/8560068\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8560068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}