{"id":6811848,"date":"2015-12-03T21:59:49","date_gmt":"2015-12-03T21:59:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/impossible-ti-hide-admin-bar\/"},"modified":"2016-08-30T20:56:58","modified_gmt":"2016-08-30T20:56:58","slug":"impossible-ti-hide-admin-bar","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/impossible-ti-hide-admin-bar\/","title":{"rendered":"Impossible to hide admin bar"},"content":{"rendered":"<p>Hi, <\/p>\n<p>I added the code below to hide admin bar for non amdins, but it doesn&#8217;t work.<br \/>\nI turned off all the plugins, but it change nothing. I also tested plugins to hide admin bar and it doesn&#8217;t work neither.<\/p>\n<p>add_action(&#8216;after_setup_theme&#8217;, &#8216;remove_admin_bar&#8217;);<\/p>\n<p>function remove_admin_bar() {<br \/>\nif (!current_user_can(&#8216;administrator&#8217;) &amp;&amp; !is_admin()) {<br \/>\nshow_admin_bar(false);<br \/>\n}<br \/>\n}<\/p>\n<p>I don&#8217;t understand why I cannot hide it :\/<\/p>\n","protected":false},"template":"","class_list":["post-6811848","topic","type-topic","status-publish","hentry","topic-tag-hide"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6811848","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\/6811848\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6811848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}