css switch in wordpress plugin – need help
-
Need a bit of help. I want to implement a script that will change the look of my slider on different wordpress pages.
Hot this and don’t really know how to implement it..
Plugin php responsible for style.css:
wp_enqueue_style( ‘wp-parallax-content-slider-css’, plugins_url( ‘css/style.css’, __FILE__ ) );
php script for switching styles:
<?php
if(is_page(‘home’)){
// we are on the home page
echo ‘<link rel=”stylesheet” src=”css/stylemain.css” />’;
}else {
echo ‘<link rel=”stylesheet” src=”css/stylemini.css” />’;
}
?>
- The topic ‘css switch in wordpress plugin – need help’ is closed to new replies.