Last active
February 15, 2016 18:49
-
-
Save bhubbard/ed5bca848b48804749cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function idxbroker_wrapper_hide_adminbar() { | |
if ( 'idx-wrapper' == get_post_type() ) { | |
// Adminbar | |
show_admin_bar( false ); // Disable WordPress Adminbar | |
wp_dequeue_style('admin-bar'); // Remove Adminbar CSS | |
wp_dequeue_script('admin-bar'); // Remove Adminbar JS | |
// Debug Bar | |
wp_dequeue_style('debug-bar'); // Remove DebugBar CSS | |
wp_dequeue_script('debug-bar'); // Remove DebugBar JS | |
// Comment Script | |
wp_deregister_script( 'comment-reply' ); // Remove Comment JS | |
} | |
} | |
add_action('wp_print_styles', 'idxbroker_wrapper_hide_adminbar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment