• I have looked in the wiki but haven’t found anything so I am wondering if you could help ??

    Due to how my blog works, I want to change the theme depending on certain conditions. However, what I can’t work out is how to define the theme within wp-config.

    If I can do this, this will be very helpful ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The theme isn’t defined in wp_config. It’s in the db in the wp_options table.

    Thread Starter Snat

    (@snat)

    Yes, I know that. What I wanted to know if I could somehow define it in the config file.

    Reason being is that I want to be able to overwrite it depending which domain the person accessed my site on.

    Not sure of the fine details but, if I was doing this, I’d add a function to define which theme to use in functions.php and then call the function in header.php.

    Thread Starter Snat

    (@snat)

    Right okay. Let me explain what I am doing, it might be easier to see ??

    I am using qTranslate. Now, I have both English and Hebrew on the site. In my wp-config file, I have made it so if the url is snat.co.uk then to set qTranslate as English and if it is snat.co.il then to set the language as snat.co.il.

    What I am trying to do now that if the domain is snat.co.uk it will use a theme called “English” or if it is snat.co.il it will use a theme called “Hebrew”.

    Now, I do this in wp-config. What I am looking to do is able to change the theme depending on what domain it is. That part sadly, I am not having much luck on ??

    Thread Starter Snat

    (@snat)

    Nevermind. Got another idea.

    Seeing it is in the database, I could just hardcode an SQL statement in the wp-config which then changes the theme each time. However, I wonder why the CPU usage would be like lol.

    Any other ideas before I try that ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Defining theme in wp-config’ is closed to new replies.