question about using external libs in a theme
-
Hi,
I had a hard time a couple weeks ago with trying to use starkers wp theme framework because it uses htaccess to rewrite urls for javascripts and css so the html5 can get access to reset.css, jquery, and modernizr.js.
I finally figured out it was using htaccess and I needed to fix permissions so it could write to it.During my search I saw several references to using wp_localize in the functions.php being the correct way to add external libs to the head but found out today that I can use bloginfo(‘template_directory’) to get to the css and js directories in my theme’s folder.
So my question is, why not use the ‘template_directory’ method? Is there something insecure about it? I ask because it seems like the simplest way and I can easily add jquery at the end of the body for faster page loading so I’m wondering if there is a reason this method wasn’t the one I found googling. Are there cons to doing it this way?
Thanks
- The topic ‘question about using external libs in a theme’ is closed to new replies.