Support » Theme: Twenty Fourteen » Failed to load resource in child theme (image)

  • Resolved Angelina Belle


    I created a child theme of twentyfourteen.

    Now, my browser gives me an error message:
    Failed to load resource … /twentyfourteen%20child%20–%20p4p/images/pattern-light.svg

    It seems that this comes about because I made a copy of style.css in my child theme. I did this because, when I tried a style.css with just the header information, it appeared that the parent style.css was not loaded, so I concluded I needed to copy everything from style.css into the child theme.

    Apparently, that means that the .post-thumbnail background url(images/pattern-light.svg) needs to be loaded relative to the child theme, rather than the theme template.

    Is this a bug or a feature?

    If this is a feature, should the documentation in
    note that it is necessary to copy the parent images directory into the child theme?

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi


    Forum Moderator

    I made a copy of style.css in my child theme

    Why? Have you reviewed child themes?

    I’d also suggest that you remove the spaces from your child theme’s folder name.

    If I do not put any CSS in the child style.css, is the theme supposed to use the css from the parent style.css? That has not been my observation.

    I decided to start over, since I missed or ignored the part about spaces in linux directory names.

    Here is what I did:
    1) Created a child folder name (twentyfourteen-child–p4p this time)
    2) Created a style.css in the child folder name, with only the required header information, and no CSS yet.
    3)I activated the new child theme
    4)I observed the site — appears to be no CSS applied.

    5) I copied all the CSS from the parent theme’s style.css into the child theme’s style.css.
    6) Observed the site again. Looks like the parent theme now. Except for the background url that cannot be loaded (see above).

    Is this a bug or a feature?

    Moderator stephencottontail


    When you make a child theme, in the child theme’s style.css you typically import your parent theme’s CSS like this: @import url('../twentyfourteen/style.css');. Then you put your customizations after that line.

    As for your image problem, it’ll be fixed if you @import Twenty Fourteen’s stylesheet like I suggested.

    I suggest I actually learn to read 🙂

    Thanks for the tip.

    Oops — “resolved”. thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Failed to load resource in child theme (image)’ is closed to new replies.