• I am trying to upload a JavaScript file. I added it to my theme’s folder but it won’t show up in my WordPress Admin. Can anyone tell me where I can add a JavaScript file to the site. Thanks in advance!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator James Huff

    (@macmanx)

    What kind of JS file is it, what do you intend to do with it, and where are you expecting it to show up?

    Thread Starter jeremyjmccourt

    (@jeremyjmccourt)

    @macmanx It includes Jquery for a drag and drop. Also so I can loop through information from a database and display it on the site. Sorry for the late response.

    Moderator James Huff

    (@macmanx)

    Ok, but where are you expecting it to show up?

    I mean, you should have no trouble uploading a JS file via FTP or SFTP, then including it in your theme functions. WordPress doesn’t/can’t prevent that.

    Thread Starter jeremyjmccourt

    (@jeremyjmccourt)

    Yes I added a css file before by simply uploading the file through the FTP and it worked fine. I did the same process for the js file but it won’t appear on the side where the rest of the files are in WordPress admin.

    Moderator James Huff

    (@macmanx)

    Right, it won’t, that editor only displays theme files. It won’t display third-party JS files.

    Thread Starter jeremyjmccourt

    (@jeremyjmccourt)

    So where should we upload the js file and expect to find it?

    Moderator James Huff

    (@macmanx)

    You won’t find it in the WordPress Dashboard.

    Let us know why you need to find it in the Dashboard, and we might have some recommendations.

    Thread Starter jeremyjmccourt

    (@jeremyjmccourt)

    I need to know the path to the file so that I can add the link to my header or functions.php

    Moderator James Huff

    (@macmanx)

    Ok, well if you added it via FTP or SFTP, the path is wherever you put it. ??

    Some (S)FTP clients allow you to right-click the file and choose something like “Show Path”.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can't Upload JavaScript File’ is closed to new replies.