Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Theme scripts & styles enqueu
#3
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); 
Reply


Messages In This Thread
Theme scripts & styles enqueu - by naug - 2015-06-04, 17:19:50
RE: Theme scripts & styles enqueu - by Tyblitz - 2015-06-04, 19:11:20
RE: Theme scripts & styles enqueu - by lnickel - 2015-06-04, 23:37:37
RE: Theme scripts & styles enqueu - by shawn_a - 2015-06-04, 23:47:20
RE: Theme scripts & styles enqueu - by Tyblitz - 2015-06-05, 00:58:37
RE: Theme scripts & styles enqueu - by lnickel - 2015-06-05, 01:34:39
RE: Theme scripts & styles enqueu - by shawn_a - 2015-06-05, 02:31:43



Users browsing this thread: 1 Guest(s)