bambou713705
Member
Posted 4 years ago #
Hi everyone,
I'am trying to change the curent theme to another one, but I can't find the way to do it..
I try this, but it doesn't work and didn't works anymore after processing :
$themes = get_themes();
switch_theme($themes[$newThemeName]['Template'], $themes[$newThemeName]['Stylesheet']);
any idea?
thanks
bambou713705
Member
Posted 4 years ago #
**but it doesn't work and the theme didn't works anymore after processing
bambou713705
Member
Posted 4 years ago #
ok, I change some stuff to my function and it's seams to work a little bit better, the theme is not broken anymore and the stylesheet is loaded, but the template still not.. (theme images are loaded, font have correct size...etc but everything is not at the correct place)
I try to use locate_template($themes[$newThemeName]['Template Files'], true) but it doesn't work...