You are missing the {...}
around the calls to wp_dequeue_script
. That means only the first one is associated with the if
statement, and the rest are being executed for every case.
Update your code to the following:
add_action( 'wp_enqueue_scripts', 'dequeue_my_scripts', 999 );
function dequeue_my_scripts()
{
if ( 'guide' == get_post_type() )
{
wp_dequeue_script( 'dw_focus' );
wp_dequeue_script( 'comment-reply' );
wp_dequeue_style( 'style' );
wp_dequeue_style( 'responsive' );
}
}