WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Theme changing by URL parameter (5 posts)

  1. prezzz
    Member
    Posted 4 years ago #

    Hi, I would like to showcase several themes under one blog URL (the same content of the blog). I do not want to switch between themes using any kind of visible widget/option, but rather by using a parameter in URL:

    http://www.url.com/themename1/
    http://www.url.com/themename2/

    or

    http://www.url.com/index.php?theme=themename1
    http://www.url.com/index.php?theme=themename2

    Is there any add-on that would allow me to do so? Or maybe it's a built-in capability I'm not aware of?

    Best Regards,
    Prez

  2. prezzz
    Member
    Posted 4 years ago #

    OK, just found this one, don't know how I missed it before...
    Case closed, I guess.

    http://codex.wordpress.org/Theme_Switching

  3. theandyreport
    Member
    Posted 4 years ago #

    Hey I'm having the exact same issue -- and I've come across the same solution as you have. The solution falls a little short for me though.

    I too would like to link directly to a theme preview. Using a theme switching plugin, I can achieve this effect no problem: http://www.blog.com/index.php?theme=classic ...or whatever.

    The trouble is, as soon as the user navigates away from the page they are on, they are back to the default theme. Is there a way to constantly pass "?theme=classic" in the URL so that the user can actually explore different pages of the blog without leaving the previewed theme behind?

  4. theandyreport
    Member
    Posted 4 years ago #

    Any ideas out there?

  5. e
    Member
    Posted 3 years ago #

    Hi theandyreport,
    You can store the variable in a cookie:
    http://php.net/manual/en/function.setcookie.php
    Or in the session:
    http://www.php.net/manual/en/session.examples.basic.php
    I'd go for the cookie option though.

Topic Closed

This topic has been closed to new replies.

About this Topic