I converted a jQuery plugin into a Wordpress one where I reference the method is_single():
if (is_single()) {
// Do something
}
BTW, this code is in my js file. Is that the mistake I'm making?
The plugin installs and runs correctly, but, I get an error saying is_single can't be found. How do I fix this? What am I doing wrong exactly?