[resolved] child themes and get_stylesheet_directory (2 posts)

  1. Adam
    Posted 3 years ago #

    I am having an issue with loading some javascript in a child theme I am creating for one of my themes.

    Essentially I do:

    get_stylesheet_directory() . '/path/to/javascript.js'

    which is what your suppose to do, But , as per the documentation, I am getting:


    which is causing it to not find the required file. because home is at the root of the site.

    any ideas on what I can do to fix this?

  2. keesiemeijer
    Posted 3 years ago #

    To retrieve the URI of the stylesheet directory use get_stylesheet_directory_uri()

Topic Closed

This topic has been closed to new replies.

About this Topic