including conditional javascript
-
hello,
I am trying to include a javascript only on my contact page. I added the following code to my functions.php file where the other javascript head links are.
Could anyone tell me if you see something wrong with it? I keep getting errors. “contact-2” is the slug on the contact page.
The error I’m getting says “unexpected “(” on the first line
if (is_page('contact-2')) { wp_enqueue_script('contact', get_bloginfo('template_url')."/scripts/contact.js"); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘including conditional javascript’ is closed to new replies.