Most efficient way to add javascript file to specific post and/or pages?
I think the best balance between efficiency, and using proper wordpress methods for adding javascript would be adding something along these lines to your themes functions.php file. For Example: functions.php: function load_scripts() { global $post; if( is_page() || is_single() ) { switch($post->post_name) // post_name is the post slug which is more consistent for matching to … Read more