Title: Custom style.css
Last modified: August 22, 2016

---

# Custom style.css

 *  [nagarjuna993](https://wordpress.org/support/users/nagarjuna993/)
 * (@nagarjuna993)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-stylecss/)
 * I am trying to style 404.php file and i have a custom style-sheet for that and
   want to use this particular stylesheet for this page only.
    So i registered the
   stylesheet in the function.php of the theme using the following code:
 *     ```
       function script_and_style()
       	{
           wp_register_style( '404-stylesheet', get_stylesheet_directory_uri() . '/css/style.css', array(), '', 'all' );
       	}
       add_action( 'wp_enqueue_scripts', 'script_and_style', 999 );
   
       function change_style() {
          if ( is_page( '404.php' ) )
          {
            wp_enqueue_style( '404-stylesheet' );
          }
       }
       add_action( 'wp_enqueue_scripts', 'change_style', 999 );
       ```
   
 * but when i load the 404 page its not loading the stylesheet.
    can anyone help
   me. my website:[](http://techrever.com)

The topic ‘Custom style.css’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [nagarjuna993](https://wordpress.org/support/users/nagarjuna993/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/custom-stylecss/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
