How can I remove the re-direct on Theme Switcher change? (2 posts)

  1. workworkwork
    Posted 6 years ago #

    Hi there,

    Ryan's Theme Switcher plugin removes the query string when it refreshes the page after a theme change (probably for good reasons) but I would like to stop it redirecting back to the index page.

    My users will be merely changing their preferred layout for categories - grid vs. list - which is set via a child theme.

    Lines 155 and 156 seem to be the culprit but I'm not 100% sure how to modify:

    $redirect = remove_query_arg('wptheme');

    Any help much appreciated.


  2. Austin Matzko
    Posted 6 years ago #

    Yes, you can just comment out the redirect part:

    // wp_redirect($redirect);

Topic Closed

This topic has been closed to new replies.

About this Topic