Title: Custom Theme CSS Stopped Working
Last modified: August 26, 2020

---

# Custom Theme CSS Stopped Working

 *  [lgehrig4](https://wordpress.org/support/users/lgehrig4/)
 * (@lgehrig4)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/custom-theme-css-stopped-working/)
 * I’m trying to create a custom theme and everything was going as suspected until
   now. I’m using MAMP for my local environment and so far I only have the index,
   header, footer, functions and css files.
 * My initial styling worked fine but now I can’t make changes. It strange because
   I can comment out all of the styling and nothing changes, but if I comment out
   the wp_enqueue_style function I do lose the styling. It’s like I’m stuck with
   the styling I did up to this point.
 * This all starting happening after adding my custom logo.
 * here is my functions.php file
 *     ```
       <?php
   
       // ADD CUSTOM STYLESHEETS
       function custom_theme_assets() {
         wp_enqueue_style('style', get_stylesheet_uri());
       }
       add_action('wp_enqueue_scripts', 'custom_theme_assets');
   
       // REGISTER PRIMARY MENU
       register_nav_menus(['primary' => __('Primary Menu')]);
   
       // Add CUSTOM LOGO
       function custom_logo_setup() {
        $defaults = array(
        'height'      => 100,
        'width'       => 400,
        'flex-height' => true,
        'flex-width'  => true,
        'header-text' => array( 'site-title', 'site-description' ),
        );
        add_theme_support( 'custom-logo', $defaults );
       }
       add_action( 'after_setup_theme', 'custom_logo_setup' );
       ```
   
 * Here is the code for adding the logo in my header file
 *     ```
       <?php 
          // maintain backward compatibility with the older versions of WordPress
          if ( function_exists( 'the_custom_logo' ) ) {
            the_custom_logo();
          }
       ?>
       ```
   
 * I only give you this because the problem started after I worked on the logo. 
   I tried removing this code but nothing changed.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [a2hostingrj](https://wordpress.org/support/users/a2hostingrj/)
 * (@a2hostingrj)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/custom-theme-css-stopped-working/#post-13314508)
 * That’s strange, it shouldn’t be happening because of just a logo change. Check
   your code and error log to see if something comes out there.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/custom-theme-css-stopped-working/#post-13318070)
 * Adding the logo shouldn’t affect CSS. It’s unusual in a localhost environment,
   but sometimes browsers aggressively cache CSS files so changes to them fail to
   appear until after the browser cache is flushed. Try flushing just to rule that
   out.
 * I suspect a simple syntax error in the file. This can cause all subsequent CSS
   to be ignored. Try validating your file.
    [https://jigsaw.w3.org/css-validator/](https://jigsaw.w3.org/css-validator/)
 *  Thread Starter [lgehrig4](https://wordpress.org/support/users/lgehrig4/)
 * (@lgehrig4)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/custom-theme-css-stopped-working/#post-13319534)
 * I replied to this last night but must not have hit enter. It was my text editor.
   The issue stopped only after restarting it. Thanks for the info though. I’m sure
   I’ll come across that as well.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom Theme CSS Stopped Working’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [lgehrig4](https://wordpress.org/support/users/lgehrig4/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/custom-theme-css-stopped-working/#post-13319534)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
