Conditional CSS Add As Page Specific

in functions.php

/* Load CSS */
function theme_styles()  {
if(is_woocommerce()||is_page(‘554’)||is_page(‘555’)||is_page(‘694’)||is_page(‘701’)||is_page(‘703’)||is_page(‘707’)||is_page(‘556’)){
wp_enqueue_style( ‘woo’, get_template_directory_uri() . ‘/css/styles97b8.css’, array());
}
else{
wp_enqueue_style( ‘style’, get_template_directory_uri() . ‘/css/style.css’, array());
wp_enqueue_style( ‘offcanvas’, get_template_directory_uri() . ‘/css/offcanvas.css’, array());
wp_enqueue_style( ‘blog’, get_template_directory_uri() . ‘/css/blog.css’, array());
}
}
add_action( ‘wp_enqueue_scripts’, ‘theme_styles’ );

Advertisements

Published by

oudarya

I am a developer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s