Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

lwoods on "Where to place my wp_enqueue_script"

$
0
0

Seems like all the examples that I can find in codex show the wp_register_script and the wp_enqueue_script in the same function. If I only want to use a particular script in a single page it seems to me that I need to place that wp_enqueue_script in that page header. Otherwise the script will be loaded all the time. Right?
So, wouldn't I register the script in my function.php and then enqueue it in my page header?

Very confusing.....!

Thanks


Viewing all articles
Browse latest Browse all 8245

Trending Articles