• Hey
    Im using the themeswitcher plugin and the code

    ?wptheme=themename

    as links to switch themes, but I also want it to go to another page in the same click…

    when I set a link like

    wordpress/category/japanese?wptheme=japanese
    It switches to the japanes theme, but cuts off the ‘category/japanese’ part and just goes to the main wordpress page.

    Is there a way to keep that information while switching themes?

Viewing 1 replies (of 1 total)
  • Thread Starter barnz2k

    (@barnz2k)

    Pretty sure just need to edit this bit of code from the plugin

    `
    function ts_set_theme_cookie() {
    $expire = time() + 30000000;
    if (!empty($_GET[“wptheme”])) {
    setcookie(“wptheme” . COOKIEHASH,
    stripslashes($_GET[“wptheme”]),
    $expire,
    COOKIEPATH
    );

    $redirect = get_settings(‘home’).’/’;

    if (function_exists(‘wp_redirect’))
    wp_redirect($redirect);
    else
    header(“Location: “. $redirect);

    exit;
    }
    }`

    I add to the end after the / the path I want `
    $redirect = get_settings(‘home’).’/category/japanese’;`
    no worries. But thats only 1, i need it to take depending on which theme it goes to..

    I tried to put an If statement in there but I have no idea what im doing.. Cheers.

Viewing 1 replies (of 1 total)
  • The topic ‘Using ?wptheme= and themeswitcher always goes to main page?’ is closed to new replies.