Hide admin bar on certain post type
Don’t hack your WordPress core. It’s overriden after every upgrade (plugins do exist for some reason). You can solve your problem in this way: 1) Open your single.php. 2) Define <?php function hideAdminBar ($post_id) { if (get_post_type ($post_id) == ‘post’) { add_filter (‘show_admin_bar’, ‘__return_false’); /* For removing the top blank space. */ echo ‘<style type=”text/css” … Read more