Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

#182136
chrisburton
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: