Use JS-files from functions.php just on certain templates / pages
-
Hello everyone
I have a lot of site specific JavaScript-files i just want to load on certain templates. Currently i load all the scripts with:
function footer_scripts() { // If query if current Page is not wp-login-php or admin page if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) { // ALL SCRIPTS } } add_action('init', 'footer_scripts');
Thank you so much for your help!
Ansicht von 1 Antwort (von insgesamt 1)
Ansicht von 1 Antwort (von insgesamt 1)
- Das Thema „Use JS-files from functions.php just on certain templates / pages“ ist für neue Antworten geschlossen.