I tried using this in template.php

function MYTHEME_js_alter(&$javascript) {
  if ($!is_front) {

but it doesn't work. Performance wise, would it be as good to have the javascript that's on every page in theme.info, then use drupal_add_js on the front page instead?

1 Answer 1


You need to update. Below are the update :

if (!drupal_is_front_page()) {

function drupal_is_front_page

Reference Link : Click Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.