Hello
I am currently working on a "local" dev wordpress site, where I have a JS file stored with the path as e.g, http://www.devsite.com/websites/wordpress/mysite/wp-content/themes/mtheme/validations.js

Currently, am using the relative path e.g. src = "././wp-content/themes/mtheme/validations.js" to load it.

However, on the live server, which is maintained by someone else and I have no access, the website is using something similar to the example to load its JS files: http://www.mysite.com/wp-content/themes/mtheme/jquery.js

My question is, will my relative path for the dev site work on the live one as well, or do is there a global path which can work on both, whereby I need to change the path on my dev server?

Recommended Answers

All 2 Replies

The best way to see if it will work is to try it. I don't think you'll have a problem with it because it is not pointing to the same root.

I managed to get it to work on my server, the only problem was when to use for example ././filename or ./filename, but I did figure it out in the end

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.