WordPress.org

Ready to get started?Download WordPress

Forums

Totally switch theme on fly without plugin (4 posts)

  1. JotaL
    Member
    Posted 2 years ago #

    Hi,

    I'm trying to do the theme that wordpress loads is variable on the fly.
    For exemple: a user from a country loads 'wp-content/themes/maintheme/' and another user loads 'wp-content/themes/anothertheme/'.

    Someone could tell me how you would do?

    Thanks.

  2. Chouby
    Member
    Posted 2 years ago #

    Did you look at 'template' and 'stylesheet' filters ?

  3. JotaL
    Member
    Posted 2 years ago #

    Yeah, I tried it, but it doesn't work well, has already been charged 'index.php' and doesn't change total template, only the calls 'get_loop' and similars.

  4. Chouby
    Member
    Posted 2 years ago #

    Look how it is done by the theme switcher plugin. These filters are used. Although the plugin has not been updated for a while, it was reported to work at least with 3.2.1.

Topic Closed

This topic has been closed to new replies.

About this Topic