BW WordPress Theme: Completely Removing BW Color Schemes Styles

After create a child theme, now we can remove all of BW color schemes styles with add some code into our child theme’s functions.php file.

<?php
function my_theme_scripts() {
$colorscheme = get_theme_mod( 'bw_color_scheme' );
if ( $colorscheme != 'default' )
wp_dequeue_style( 'bw-color-scheme', get_template_directory_uri() . '/schemes/' . $colorscheme . '.css' , array(), null );
}
add_action( 'wp_enqueue_scripts', 'my_theme_scripts', 20 );
?>


Now, we can customize the theme’s colors with whatever we want to.

Related: Coloring BW WordPress Theme Manually.
Read also: Adding Social Media Icon.

Note: This post updated since the release of the BW WordPress theme version 4.1

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s