The MU forums have moved to WordPress.org

Manually directing the browser to a different theme than the default (5 posts)

  1. jmarx75
    Member
    Posted 15 years ago #

    Hey everyone,

    We have a very popular network of blogs that really need the WP cache plugin to be in place or we have problems with the server.

    The problem i keep running into is that the mobile version does not work in conjunction with the caching. No matter what hacks or solutions I have tried. My question is .. is there any way to point to be blog from a different address than the main one .. to display the blog in a mobil friend environment.

    basically, im looking for this:

    Our main blogs url.

    http://subdomain.domain.com

    What im looking to do:
    http://subdomain.domain.com/index.php&theme=mobile

    Then i'll create a shortcut alias and tell my users to point to that.

    Does anyone have feedback on this issue? I hope i have written it clearly enough.

    Thanks in advance for any help you can provide,
    Jeff

  2. dsader
    Member
    Posted 15 years ago #

    1. WPMU2.6 lets you change the definition the WP_CONTENT_DIR and WP_CONTENT_URL, but this only works if the wp-content dir is still on your machine, as far as I know.

    2. You can filter just the template directory and url with a plugin

    add_filter('theme_root', 'your_theme_root_filter_function'));
    add_filter('theme_root_uri', 'your_theme_root_uri_filter_function'));

    3. http://www.ringofblogs.com/2008/04/12/off-loading-wpmu-theme-files-to-amazon-s3/

  3. andrea_r
    Moderator
    Posted 15 years ago #

  4. cafespain
    Member
    Posted 15 years ago #

    I had a similar(ish) problem with a friend who develops accessible websites where you can switch the style sheet and theme for easier to read versions (for partially sighted or dyslexic viewers), we never could get it to work properly with a caching solution so gave up in the end.

    As far as I'm aware Wp-super-cache (or wp-cache) will cache the html (and thus theme details and style) of the first person that goes to a page.

    I was going to write my own smaller caching system, but simply did not have the time.

    If anyone can work out how to do this then that would be fantastic.

  5. jmarx75
    Member
    Posted 15 years ago #

    Thanks for the responses.

    dsader, We aren't on the latest version .. we are a couple back. It's a massive pain to upgrade because the amount of blogs bloggers and traffic in a commercial environment. I've been meaning to upgrade for a while .. but haven't gotten to it. Does that hook work in the older versions? And if so how do you practically use it?

    Andrea, the problem with those plugins is that none of them play well with the caching plugin. So i basically just want to force my blog to go to a different theme using http.

    The only way any of those plugins work is if i shut off wp-cache and if i do that ..the server blows up. So im kinda stuck. If i can figure out a way to send users to a different url than the main blog while still preserving the main blog theme for my regular users .. i think that would be the best solution.

    I just don't if anyone has done that before. I'll gladly try to hack my way through it .. but i didn't want to reinvent the wheel if it had already been done :)

    I hope im making sense!

About this Topic