2015-06-04, 23:37:37
Really? Is that bad practice? I have been writing my scripts and css inside a functions.php page. This is what I have been doing and its been working fine for me. I like doing it this way so I can load a specified script or link based on the page slug if needed.
PHP Code:
$template = $TEMPLATE;
register_script('jquery-1.11.1.min', $site_url. 'theme/'. $template. '/assets/js/vendor/jquery-1.11.1.min.js', '1.11.1', TRUE);
queue_script('jquery-1.11.1.min', GSFRONT);
$site_url = $SITEURL;
register_style ('style', $site_url.'theme/myTheme/style.css', '1.0', 'screen');
queue_style('style', GSFRONT);