De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle )Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback )Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.For this last option, if the Parent Theme uses:
`add_actionadd_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority )`;...then the Child Theme would use:
`add_actionadd_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} )`;
De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle )Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback )Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.For this last option, if the Parent Theme uses:
`add_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority )`...then the Child Theme would use:
`add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} )`
De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle )Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback )Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.For this last option, if the Parent Theme uses:
add_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority );...then the Child Theme would use:
add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} );
style.css, directly in the document head (thus beforewp_head()is fired){varietal}.css, atwp_enqueue_scripts, with priority11, infunctions/dynamic-css.php:/** * Enqueue Varietal Stylesheet */ function oenology_enqueue_varietal_style() { // define varietal stylesheet global $oenology_options; $oenology_options = oenology_get_options(); $varietal_handle = 'oenology_' . $oenology_options['varietal'] . '_stylesheet'; $varietal_stylesheet = get_template_directory_uri() . '/varietals/' . $oenology_options['varietal'] . '.css'; wp_enqueue_style( $varietal_handle, $varietal_stylesheet ); } // Enqueue Varietal Stylesheet at wp_print_styles add_action('wp_enqueue_scripts', 'oenology_enqueue_varietal_style', 11 );
style.css, directly in the document head (thus beforewp_head()is fired){varietal}.css, atwp_enqueue_scripts, with priority11, infunctions/dynamic-css.php:/** * Enqueue Varietal Stylesheet */ function oenology_enqueue_varietal_style() { // define varietal stylesheet global $oenology_options; $oenology_options = oenology_get_options(); $varietal_handle = 'oenology_' . $oenology_options['varietal'] . '_stylesheet'; $varietal_stylesheet = get_template_directory_uri() . '/varietals/' . $oenology_options['varietal'] . '.css'; wp_enqueue_style( $varietal_handle, $varietal_stylesheet ); } // Enqueue Varietal Stylesheet at wp_print_styles add_action('wp_enqueue_scripts', 'oenology_enqueue_varietal_style', 11 );
style.css, directly in the document head (thus beforewp_head()is fired){varietal}.css, atwp_enqueue_scripts, with priority11, infunctions/dynamic-css.php:/** * Enqueue Varietal Stylesheet */ function oenology_enqueue_varietal_style() { // define varietal stylesheet global $oenology_options; $oenology_options = oenology_get_options(); $varietal_handle = 'oenology_' . $oenology_options['varietal'] . '_stylesheet'; $varietal_stylesheet = get_template_directory_uri() . '/varietals/' . $oenology_options['varietal'] . '.css'; wp_enqueue_style( $varietal_handle, $varietal_stylesheet ); } // Enqueue Varietal Stylesheet at wp_print_styles add_action('wp_enqueue_scripts', 'oenology_enqueue_varietal_style', 11 );
- De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle )De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle ) - Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback )Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback ) - Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.For this last option, if the Parent Theme uses:
`add_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority )`...then the Child Theme would use:
`add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} )`
For the last option, if the Parent Theme uses:
`add_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority )` ...then the Child Theme would use:
`add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} )` - De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle ) - Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback ) - Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.
For the last option, if the Parent Theme uses:
`add_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority )` ...then the Child Theme would use:
`add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} )` De-enqueue the Parent-Theme stylesheet, via
wp_dequeue_style( $handle )Remove the Parent Theme callback that enqueues the style, via
remove_action( $hook, $callback )Use the CSS cascade to override the Parent-Theme stylesheet, by hooking your Child-Theme stylesheet
wp_enqueue_style()call into the same hook with a lower priority or into a later hook.For this last option, if the Parent Theme uses:
`add_action( 'wp_enqueue_scripts', 'parent_theme_enqueue_style', $priority )`...then the Child Theme would use:
`add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_style', {$priority + 1} )`