Last active
September 18, 2017 20:31
-
-
Save 2aces/b02f5e2399e5defa3298c38ec78fc20a to your computer and use it in GitHub Desktop.
WordPress: removendo o CSS personalizado criado pelo Customizer
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
// primeiro verifica se não estamos no Admin | |
if( !is_admin ){ | |
// detecta se estamos num arquivo | |
if( is_archive() ){ | |
//remove a função wp_custom_css_cb da lista de ações em wp_head usando a mesma prioridade 101 | |
remove_action('wp_head', 'wp_custom_css_cb', 101); | |
} | |
} |
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
// primeiro verifica se não estamos no Admin | |
if( !is_admin ){ | |
// acessa a variável global post | |
global $post; | |
// detecta o post_id for igual o post id da página | |
if( $post->post_id === 10){ | |
//remove a função wp_custom_css_cb da lista de ações em wp_head usando a mesma prioridade 101 | |
remove_action('wp_head', 'wp_custom_css_cb', 101); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment