开发者

Where do I apply custom CSS color changes to Wordpress Theme?

开发者 https://www.devze.com 2023-04-04 04:48 出处:网络
I\'m creating a small WordPress theme, which has a separate control panel. This panel has a lot of color and fon开发者_StackOverflow中文版t changes. I had no problem in saving all the data into mysql,

I'm creating a small WordPress theme, which has a separate control panel. This panel has a lot of color and fon开发者_StackOverflow中文版t changes. I had no problem in saving all the data into mysql, but I can't figure out the best way to apply these changes to the design.

What I want to ask, is what is the best, most efficient and popular way to apply color and font settings?

Should I apply these changes with style="" while generating the design? Should I edit it with JavaScript? Include it in headers <style>, or maybe even edit the .css file?


The best way would be to make the changes directly to the css file. For this you would need to parse the css content. Grab a specific selector content and change it's properties.

An easy way is to output the custom properties in the page header (after the style.css in order to overwrite the default properties) or to put them in a separate css file.

Also, it my be helpful an existing Wordepress theme generator, like http://www.lubith.com

0

精彩评论

暂无评论...
验证码 换一张
取 消