Title: Multiple CSS files for each .php file (IFELSE)
Last modified: August 31, 2016

---

# Multiple CSS files for each .php file (IFELSE)

 *  [itsnotagame](https://wordpress.org/support/users/itsnotagame/)
 * (@itsnotagame)
 * [10 years ago](https://wordpress.org/support/topic/multiple-css-files-for-each-php-file-ifelse/)
 * I have 6 different pages on my website, however I want each page to have very
   different CSS.
 * This is what I currently have in the header, however I notice some CSS happens
   on other pages when it shouldn’t.
 *     ```
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> 
   
       <?php if ( is_page_template( 'front-page.php' ) ) { ?>
       <link rel="stylesheet" href="<?php bloginfo('front-page.css'); ?>">
       <?php
       } elseif ( is_page_template( 'home.php' ) ) { ?>
       <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/home.css" media="screen" type="text/css" />
       <?php
       } elseif ( is_page_template( 'digital.php' ) ) { ?>
       <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/digital.css" media="screen" type="text/css" />
       <?php
       } elseif ( is_page_template( 'print.php' ) ) { ?>
       <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/print.css" media="screen" type="text/css" />
       <?php
       } elseif ( is_page_template( 'video.php' ) ) { ?>
       <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/video.css" media="screen" type="text/css" />
       <?php
       } else {
   
       }
   
       ?>
       ```
   
 * Any suggestions would be greatly appreciated.

Viewing 1 replies (of 1 total)

 *  [Clarion Technologies](https://wordpress.org/support/users/clarionwpdeveloper/)
 * (@clarionwpdeveloper)
 * [10 years ago](https://wordpress.org/support/topic/multiple-css-files-for-each-php-file-ifelse/#post-7386092)
 * Hello itsnotagame,
 * Can you please share you website link.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Multiple CSS files for each .php file (IFELSE)’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [ifelse](https://wordpress.org/support/topic-tag/ifelse/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Clarion Technologies](https://wordpress.org/support/users/clarionwpdeveloper/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/multiple-css-files-for-each-php-file-ifelse/#post-7386092)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
