Can I add JS file and Images to the root directory.
-
Hi,
I have built a program for my site using javascript.
I need to add a js file and css file and I need to add images to the root image folder of my WP site.
Is this easily done in WordPress…
I am having difficulty finding out if this can be done on WIX websites.. anyone know that?
Thanks in advance
-
Hey there,
Is this easily done in WordPress…
There are ways to integrate JS, sure. I can’t speak to how easy it would be, but if you know enough to write your own JS it shouldn’t be bad.
Please note we don’t allow JS on free sites hosted here for security reasons, but you can add it to a site if its plan supports that:
https://wordpress.com/support/code/You can also test WordPress locally if you’d like. It’s of course outside the scope of our hosting support, but there are tips here on the site for the free WordPress software: https://wordpress.org/support/article/installing-wordpress-on-your-own-computer/
Let us know if you have questions!
-
Oh! I also noticed your tag mentioned root directory. You wouldn’t want to do that on our services.
But you could, for example, include your JS and CSS in a custom theme. There are details on that here:
-
-
-
-
Oh, noting too, if your images are part of your theme or plugin, those go in another director, and all of those directories are typically in wp-content.
-
One more thing: I do want to clarify our forums support here won’t be able to answer all developer questions so much as questions about our hosting.
There’s lots of info on WordPress development here though, and if you want to tell us what your script will do we may be able to point you to a relevant section.
- The topic ‘Can I add JS file and Images to the root directory.’ is closed to new replies.