WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. workworkwork
    Member
    Posted 4 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');
    wp_redirect($redirect);

    Any help much appreciated.

    http://wordpress.org/extend/plugins/theme-switcher/

  2. Austin Matzko
    Member
    Posted 4 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