Title: CSS frontend not loading
Last modified: March 8, 2020

---

# CSS frontend not loading

 *  Resolved [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/)
 * I have some block css i am trying to get work but it does not load on the frontend,
   
   the backend is working fine
 * here are the files i have tried
    block-anchor-block.php (for reference) block-
   anchor-block.css(worked backend only) also created two styles to see if the would
   work but no luck block-anchor-block.css (did not work) preview-anchor-block.css(
   worked)
 * Then I created a global blocks.css and that does not work on the frontend either
 * Is there something i am missing
    -  This topic was modified 6 years, 2 months ago by [alienfactory](https://wordpress.org/support/users/alienfactory/).
      Reason: made mistake

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/css-frontend-not-loading/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/css-frontend-not-loading/page/2/?output_format=md)

 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521711)
 * Hi [@alienfactory](https://wordpress.org/support/users/alienfactory/),
    Thanks
   for letting me know about that.
 * Where are those stylesheets?
 * 1. Parent theme
    2. Child theme 3. Simple theme (not a parent or child) 4. Plugin
 *  Thread Starter [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521718)
 * it is locaked in {mytheme}/blocks/block-anchor-block.css
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521725)
 * OK, thanks. That’s not a [parent or child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/),
   right?
 *  Thread Starter [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521738)
 * no just a standard theme
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521744)
 * OK, thanks
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521757)
 * Are you developing this in a local environment now?
 * If so, could you please try on the command line:
 * `wp shell`
    `clearstatcache()`
 * Block Lab uses [file_exists()](https://www.php.net/manual/en/function.file-exists.php)
   to check if the stylesheet exists, but that function is cached.
 * So [clearstatcache()](https://www.php.net/manual/en/function.clearstatcache.php)
   should clear that cache.
 *  Thread Starter [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521793)
 * ok dont mark this closed i am having issue with getting in to the wp shell keeps
   saying Error establishing a database connection once i resolve i will let you
   know if that worked
 * but on a side note i am having the same issue on the live site when i tested 
   it
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521798)
 * OK, thanks. Let me know when ‘Error establishing a database connection’ is resolved.
 *  Thread Starter [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521819)
 * ok i am getting a => NULL when running clearstatcache() is that the expect response
 * but id i run the file_exists(‘wp-content/themes/thisisitdesign/blocks/block-anchor-
   block.css’);
 * i get a true back
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521827)
 * Thanks!
 * Yeah, `null` is what I got from `clearstatcache()` also.
 * > but id i run the file_exists(‘wp-content/themes/thisisitdesign/blocks/block-
   > anchor-block.css’);
   > i get a true back
 * OK, thanks. Does this issue still exist?
 *  Thread Starter [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12521851)
 * yes the issue still exist
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12522376)
 * OK, sorry for the delay.
 * For now, enqueuing the stylesheet on the `block_lab_render_template_*` hook should
   work:
 * [https://github.com/getblocklab/block-lab/blob/bd9c9125db0f1736497fbbbf2c75d78f0b816339/php/blocks/class-loader.php#L408](https://github.com/getblocklab/block-lab/blob/bd9c9125db0f1736497fbbbf2c75d78f0b816339/php/blocks/class-loader.php#L408)
 * For example:
 *     ```
       add_action(
       	'block_lab_render_template_anchor-block',
       	static function() {
       		wp_enqueue_style(
       			'example-stylesheet-slug',
       			// Path to stylesheet
       		);
       	}
       );
       ```
   
 * Of course, I’ll also work on reproducing and ideally fixing the issue in Block
   Lab.
    -  This reply was modified 6 years, 2 months ago by [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/).
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12533358)
 * This issue isn’t fixed, but I’m closing this as there’s no immediate action.
 * I’ll keep this in mind, in case a bug in loading stylesheets comes up that I 
   can reproduce.
 *  Thread Starter [alienfactory](https://wordpress.org/support/users/alienfactory/)
 * (@alienfactory)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12533372)
 * ok one other note i was thinking it was a php version issue so i change to the
   letest version 7.4 and now i white screen with ctritical error message when i
   use a block lab block.
 *  Plugin Author [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/#post-12533606)
 * Uf, what is the error message?

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/css-frontend-not-loading/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/css-frontend-not-loading/page/2/?output_format=md)

The topic ‘CSS frontend not loading’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/block-lab_5c34e8.svg)
 * [Block Lab](https://wordpress.org/plugins/block-lab/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/block-lab/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/block-lab/)
 * [Active Topics](https://wordpress.org/support/plugin/block-lab/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/block-lab/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/block-lab/reviews/)

 * 19 replies
 * 2 participants
 * Last reply from: [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/css-frontend-not-loading/page/2/#post-12538475)
 * Status: resolved