Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

foundation.css file throw an 404 error on childthemes #758

Closed
tolgacanatan opened this issue Mar 7, 2016 · 2 comments
Closed

foundation.css file throw an 404 error on childthemes #758

tolgacanatan opened this issue Mar 7, 2016 · 2 comments

Comments

@tolgacanatan
Copy link

Hello everyone,

I get an 404 error for http://localhost/X/wp-content/themes/my-child-theme-name/assets/stylesheets/foundation.css?ver=2.3.0 file.

I didn't get an 404 error when I change get_stylesheet_directory_uri() to get_template_directory_uri()

I'm talking about : https://github.com/olefredrik/FoundationPress/blob/v2.5.0/library/enqueue-scripts.php#L16

Is there any special reason to use get_stylesheet_directory_uri() instead of get_template_directory_uri()?

How can this bug be reproduced?

  • Create a child theme and set to default theme from WP admin panel.
  • Visit your homepage and check your browser network console log.

What did you expect to happen?

I must get 200, not 400.

@olefredrik
Copy link
Owner

Thanks. Fixed #759

@Stevie-Ray
Copy link

This gives me an error when using a child theme with FoundationPress, see the get_stylesheet_directory_uri documentation.

Use get_template_directory_uri() to avoid being overridden by a child theme

so get_stylesheet_directory_uri was the right way for child themes :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants