top of page

Add CSS to Specific Page Only Wordpress

  • Writer: سُلَيْمَان بْن دَاوُوْد
    سُلَيْمَان بْن دَاوُوْد
  • Jun 20, 2020
  • 1 min read

if( basename( get_page_template() ) == "page-newhome.php" ){
		wp_enqueue_style( 'bootstrap',   get_stylesheet_directory_uri().'/templates/css/bootstrap.css'); 
		wp_enqueue_style( 'lightslider', get_stylesheet_directory_uri().'/templates/css/lightslider.css'); 
		wp_enqueue_style( 'vicwest',     get_stylesheet_directory_uri().'/templates/css/vicwest-temp-styles.css',array(),$style_css); 
		wp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri().'/templates/js/bootstrap.min.js',array('jquery'),'4.1.3', true );
		wp_enqueue_script( 'lightslid-js', get_stylesheet_directory_uri().'/templates/js/lightslider.js',array('jquery'),'', true );
		wp_enqueue_script( 'developer-js', get_stylesheet_directory_uri().'/templates/js/developer.js',array('jquery'),'', true );
	}


Recent Posts

See All
Hide Upcoming Events

Hiding Upcoming Events can be relatively useful when you are using ACF fields to show Dates for an an Event The Following Snippet is an...

 
 
 

Comments


© 2020 by syednazrulhassan

bottom of page