Can I add customizer to a custom made wordpress theme and have those styles in a CSS file?


I would like to make my colours, logos, and hero images all dynamically changable using my customizer.php. I haven’t played around with customizer much, but understand I need to use php to store the values somewhere. By my understanding, I would need to put in on the page.php header.php, or wherever I would like it to show up and put it inline the tag.I think in terms of cleanliness and speed it’s better to actually inject it into a CSS file.

Below is the way I know I can add the styles, but is there another solution, that’s better for performance. (if I add lots of customization. I am looking to make the header and paragraph font customizable, link colors, button colours, logo img, banner image, and background colours combos. This seems like a lot to inline styles. I would also like to use SCSS if possible as well. Thoughts and opinions?

 color: $text_color;
 font-family: $paragraph_font;
h1,h2,h3 {
 color: $header_color;
 font-family: $header_font;
, , , , davidb3rn 2 years 2020-09-04T10:10:21-05:00 0 Answers 89 views 0

Leave an answer