Home › Forums › Back End › WP – How to add a script to a specific page › Reply To: WP – How to add a script to a specific page
September 8, 2014 at 7:54 am
#182136
Participant
is_page_template(templateName) IS the if statement I was referring to ;)
Sorry. Was directing my statement to the OP.
The problem is that a template check can’t be called just everywhere you like — apparently it only returns something when it’s called in The Loop, so I’m trying to find another way to check for the template.
This guy is doing it (even with the if
statement) and it works. Hmm.
http://wordpress.org/support/topic/conditional-wp_enqueue-with-is_page_template
Resources: