• Resolved priyankkhunt

    (@priyankkhunt)


    Hi David,

    I got situation like I am using multiple themes in my php website and also integrate a wordpress blog. I have more than 5 themes and want to change every theme by just passing query string url.

    The theme name passed in query string is should not be activate permanently just render when it passed by URL, otherwise load default theme which is activated.

    for example: this is my site url: http://example.com

    where I want to switching themes by passing query string url like: http://example.com?mytheme=red_theme
    http://example.com?mytheme=blue_theme etc.

    Currently my activated theme in wordpress is like “blue_theme”, and my wordpress blog url is like: http://example.com/blog?mytheme=red_theme

    e.g.: ‘red_theme’ should be display when we passed in url.

    otherwise if I go through this url: http://example.com/blog

    Then default theme (blue_theme) should be display.

    I can adjust it in core php but i don’t know how to do with wordpress.

    Here I found this wordpress plugin but I think doesn’t get idea how it works and how to use to reach our exact need.

    Please more specify your answer because I am new to wordpress.

    Thanks
    Priyank

    https://wordpress.org/plugins/jonradio-multiple-themes/

Viewing 1 replies (of 1 total)
  • Plugin Author David Gewirtz

    (@dgewirtz)

    Yep, that’s doable. First go into Appearances->Themes and set your current active theme, which will be your default theme.

    Next, go to Settings->Multiple Themes and set your Site Home to the same theme you set in Appearances->Themes. Make sure you save changes.

    Now, scroll on down to For A Query Keyword=Value on any Page, Post or other non-Admin page and select the Red Theme from the drop down. Enter “mytheme” into the Query Keyword field and “red” into Query Value. Save. Repeat with blue.

    Works like a charm. Without the query parameters, you go to the default theme. With the query parameters, you go to the alternate themes.

    –David

Viewing 1 replies (of 1 total)
  • The topic ‘Use Multiple Themes By Query String’ is closed to new replies.