• Hello everyone,

    I have the following questing.

    While i am trying to do the following:

    <?php if (!(is_404()) && (is_single()) || (is_page()) || (is_archive())) {
    echo'';
    }
    else {
    echo '<script type="text/javascript" src="/javascript/thickbox.js"></script>';
    }
    ?>

    so i can load a .js file only on certain pages and NOT in the index page and the sub pages, based on pagination, it is not working. What i am trying to do is ONLY load the js file to the index page and NOT to the other pages as an addon is already loading it.

    The code is correct as i have tryed it with some text and it has worked correctly

  • The topic ‘WordPress .js files called by demand’ is closed to new replies.