• I’m looking for a little more detail on the following from the codex.

    $src
    (string|boolean) (optional) Path to the stylesheet from the root directory of WordPress. Example: ‘/css/mystyle.css’. You should never hardcode URLs to local styles, use Function Reference/plugins_url and Function Reference/bloginfo to get a proper URL.
    Default: false

    When I set up WordPress I added an “assets” folder at the top level. This folder is then subdivided into folders for scripts, images and CSS.

    When I use wp_enqueue_ or wp_register_ for styles or scripts I simply add the src as the path the appropriate folder. It appears to work without problems.

    However, reading the codex it would appear that this is not a recommended practice, but there is no explanation as to why.
    Is there some problem with taking the approach of using an assets folder.

    Any references to explanations would be greatly appreciated.

    Thanks

  • The topic ‘Creating Links for Scripts or Style Files’ is closed to new replies.