admin管理员组

文章数量:1297110

I'm trying to unqueue style.css file from a specific page.

In my functions.php (child theme) if I add:

add_action( 'wp_enqueue_scripts', 'apc_child_desregistra_estilos', 11 );
function apc_child_desregistra_estilos() {
    wp_dequeue_style( 'main-styles' );
}

It works.

But when I add something like:

if (is_front_page()):
wp_dequeue_style( 'main-styles' );
endif;

It doesn't.

I really don't know what I am doing wrong.

本文标签: wp enqueue scriptUnqueue css file from specific page