How to change theme programmatically
-
Hi,
This may look like a very easy question, but somehow I was not able to find any info anywhere. I have a wordpress site, with two themes: dark and light. I have a toggle buton that changes this – it is done by the theme implementation itself.
I would like to change the Enlighter theme programmatically, when I press dark/light page theme button change. All I was able to find out that I can change the theme settings in wordpress settings in general, but I do not wat that – I want it to be dynamic, depending on the toggle button position. All I was able to find out is this piece of code:
EnlighterJS.init('pre', 'code', { language : 'javascript', theme: 'godzilla', indent : 2 });
But when I add it the firebug style of editor do not change at all. How can I do this ?
cheers
- The topic ‘How to change theme programmatically’ is closed to new replies.