Adding custom style sheets August 28, 2015, 09:43:28 am How to add custom style sheets to new theme ? Should I add it to index.template.php ? An example can help a lot.
Re: Adding custom style sheets Reply #1 – August 28, 2015, 10:49:44 am Yup, add it to the head section in index.template.php. For example before </head>Code: [Select]<link rel="stylesheet" type="text/css" href="mystyle.css">
Re: Adding custom style sheets Reply #2 – August 28, 2015, 02:34:26 pm Another way is to use loadCSSFile in the template_init function.
Re: Adding custom style sheets Reply #3 – August 28, 2015, 02:48:03 pm Quote from: emanuele – August 28, 2015, 02:34:26 pmAnother way is to use loadCSSFile in the template_init function.The better way so it can compact/minimize and you can keep track of what's loaded using the debugging tools.
Re: Adding custom style sheets Reply #4 – August 28, 2015, 02:52:49 pm And, you can even decide in which template load it, because you can just create a "template_NameOfTheTemplate" function and that is called automatically just after the file has been included (i.e. just after the call "loadTemplate('NameOfTheTemplate')").
Re: Adding custom style sheets Reply #5 – August 28, 2015, 03:39:15 pm Well @emanuele always has a nice approach
Re: Adding custom style sheets Reply #6 – August 28, 2015, 05:17:17 pm LOLThat's the result of messing with the code: you discover things that only very few people know.
Re: Adding custom style sheets Reply #7 – October 17, 2015, 05:02:44 am @emanuele Quote from: emanuele – August 28, 2015, 02:34:26 pmAnother way is to use loadCSSFile in the template_init function.care to post an example? sorry newbie here thanks
Re: Adding custom style sheets Reply #8 – October 17, 2015, 08:44:56 am http://www.elkarte.net/community/index.php?topic=2998.msg20906#msg20906