Title: Archive.php custom css?
Last modified: August 21, 2016

---

# Archive.php custom css?

 *  Resolved [fernandolawl](https://wordpress.org/support/users/fernandolawl/)
 * (@fernandolawl)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/archivephp-custom-css/)
 * Just a quick question.
    If I want my archive.php to not use style.css and to 
   use a different custom made style instead, how do I do that?
 * I learned that I could do it with template pages using this code and it worked
   but I can’t get it to work for archive.php. Any help would be great! Thanks in
   advance!
 *     ```
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
       <!-- management script -->
       <?php
       if ( is_page_template('page-about.php')) { ?>
       <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/about.css" />
       <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/main.css" />
       <?php } ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [fernandolawl](https://wordpress.org/support/users/fernandolawl/)
 * (@fernandolawl)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/archivephp-custom-css/#post-4222923)
 * I figured it out in case anyone was wondering. All you do is have to change the
   is_page_template code to is_archive. Here is the snippet of code below.
 *     ```
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
   
       <?php
       if ( is_archive()) { ?>
       <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/blog.css" />
       <?php } ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Archive.php custom css?’ is closed to new replies.

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [fernandolawl](https://wordpress.org/support/users/fernandolawl/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/archivephp-custom-css/#post-4222923)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
