Title: 404 Errors When Using Child Theme
Last modified: August 21, 2016

---

# 404 Errors When Using Child Theme

 *  Resolved [Dominic](https://wordpress.org/support/users/dominicp/)
 * (@dominicp)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/)
 * First, thanks for a great theme. I’m making some small modifications with a child
   theme and I’m seeing some 404 errors for the following files:
 *  [http://example.com/wp-content/themes/adamos-child/js/flexslider.css?ver=3.9&#8243](http://example.com/wp-content/themes/adamos-child/js/flexslider.css?ver=3.9&#8243);
   
   [http://example.com/wp-content/themes/adamos-child/js/flexslider-init.js?ver=3.9&#8243](http://example.com/wp-content/themes/adamos-child/js/flexslider-init.js?ver=3.9&#8243);
   [http://example.com/wp-content/themes/adamos-child/js/jquery.flexslider-min.js?ver=3.9&#8243](http://example.com/wp-content/themes/adamos-child/js/jquery.flexslider-min.js?ver=3.9&#8243);
   [http://example.com/wp-content/themes/adamos-child/js/flexslider-init.js?ver=3.9&#8243](http://example.com/wp-content/themes/adamos-child/js/flexslider-init.js?ver=3.9&#8243);
 * This problem seems to stem from referencing these resources with `get_stylesheet_directory_uri()`
   instead of `get_template_directory_uri()` in the theme’s functions.php file. 
   Given that these are mostly libraries that shouldn’t be overridden by child themes,
   it seems like `get_template_directory_uri()` would be a better choice. Thanks.
 * See the codex here: [https://codex.wordpress.org/Function_Reference/get_template_directory_uri](https://codex.wordpress.org/Function_Reference/get_template_directory_uri)

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

 *  [salsaturation](https://wordpress.org/support/users/salsaturation/)
 * (@salsaturation)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846150)
 * You are right and hopefully the theme author will correct that issue on the next
   version. Unfortunately it should have been picked up during the theme review 
   process but wasn’t. Most likely the theme author will see this ticket but I have
   added a comment in the them trac as well just in case
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846152)
 * I’d argue that this isn’t a bug but a deliberate design decision. By using `get_stylesheet_directory_uri()`.
   the theme’s developers of offering the greatest possible child theme flexibility–
   including an option for people to use custom .js scripts. All you need to do 
   initially is place a copy of the js folder in your child theme.,
 *  [salsaturation](https://wordpress.org/support/users/salsaturation/)
 * (@salsaturation)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846157)
 * Hi Esmi sorry to differ on this but this is a requirement as far as I know nothing
   has changed. Here is an example reviere from Chip
 * > Required
   >  When referencing (such as for enqueueing) resources (e.g. scripts,
   > stylesheets, etc.), use get_template_directory()/get_template_directory_uri()
   > instead of get_stylesheet_directory()/get_stylesheet_directory_uri(). The latter
   > will break in a Child Theme.
 * [https://themes.trac.wordpress.org/ticket/17607#comment:10](https://themes.trac.wordpress.org/ticket/17607#comment:10)
 *  [salsaturation](https://wordpress.org/support/users/salsaturation/)
 * (@salsaturation)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846166)
 * Here is the relevant guideline
 * > Themes are required to include functional and resource files in a manner that
   > facilitates the use of Child Themes:
   >  – Use get_template_directory_uri() to
   > include functional files, or resources that are not intended to be included
   > in/over-ridden the Child Theme. – Use get_stylesheet_directory_uri() to include
   > resources that are intended to be included in/over-ridden by the Child Theme.
 * [http://make.wordpress.org/themes/guidelines/guidelines-template-tags-and-hooks/](http://make.wordpress.org/themes/guidelines/guidelines-template-tags-and-hooks/)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846167)
 * > Use get_template_directory_uri() to include functional files, or resources 
   > _that are not intended to be included in/over-ridden the Child Theme_.
 * _[Italics are mine]_
 * Seems to me that the moot point here is the intention of the theme developer.
   If this _was_ a deliberate design decision, than it wouldn’t be bug. Wouldn’t
   be the first time Chip & I have disagreed. 🙂
 *  [salsaturation](https://wordpress.org/support/users/salsaturation/)
 * (@salsaturation)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846171)
 * 🙂 Fair enough and not necessarily a bug but if the child theme breaks at it’s
   most basic then that is wrong after all we always advice users to create child
   themes. A user should just create a basic child theme rather than have to fix
   such issues
 * If the user then wants to include their own script libraries they can always 
   dequeue the parent them files and enqueue their one version… just my 2c’s
 *  Theme Author [Template Express](https://wordpress.org/support/users/danstriker/)
 * (@danstriker)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846187)
 * OK thanks guys – I will change this for the update

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

The topic ‘404 Errors When Using Child Theme’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/adamos/3.2/screenshot.png)
 * Adamos
 * [Support Threads](https://wordpress.org/support/theme/adamos/)
 * [Active Topics](https://wordpress.org/support/theme/adamos/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/adamos/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/adamos/reviews/)

## Tags

 * [404-error](https://wordpress.org/support/topic-tag/404-error/)
 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)

 * 7 replies
 * 4 participants
 * Last reply from: [Template Express](https://wordpress.org/support/users/danstriker/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/404-errors-when-using-child-theme/#post-4846187)
 * Status: resolved