WordPress not recognizing simple Javascript file (2 posts)

  1. Martyn Chamberlin
    Posted 4 years ago #

    Okay, so I've uploaded this *super* simple HTML page here:


    It's utilizing LinkedIn's "Sign In" API. View the source. It's two lines of code. Nothing.


    I created a home.php file in my child theme directory, and pasted this:

    <?php require(CHILD_DIR.'/test.html'); ?>

    This means that if you view the source at http://www.medicaldevicesgroup.net/, it's EXACTLY the same as the source at http://medicaldevicesgroup.net/wp-content/themes/medicaldevicesgroup/test.html. The only difference is that the home page is in WordPress, and the other URL isn't.

    The home page script, however, doesn't work. WHY???? Help! Thanks.

  2. Martyn Chamberlin
    Posted 4 years ago #

    Fixed! Here's what I friend told me:

    The reason is because the LinkedIn API that you are using is for http://medicaldevicesgroup.net and not http://www.medicaldevicesgroup.net. Notice the "www" in 2nd URL. You need to change your URL in the LinkedIn API.

    To see what I mean try going to http://www.medicaldevicesgroup.net/wp-content/themes/medicaldevicesgroup/test.html and it will not work there too.

    I changed my URL to "www" in my LinkedIn API, and everything's working now. xoxoxo

Topic Closed

This topic has been closed to new replies.

About this Topic