How To Fix Redirection Incompatibility With Thrive Page Builder

Knowledge Base > Compatibility > How To Fix Redirection Incompatibility With Thrive Page Builder

in Compatibility

Thrive Page Builder is a popular page builder plugin for WordPress.

Currently Thrive utilises the same template_redirect hook that we use for redirecting users and therefore an inherit incompatibility exists on some sites using it.

To work around the issue you can place the following in your functions.php in your theme which will adjust the priority of the redirect so that our redirection occurs prior to Thrive hooking in to do it’s thing:

function adjustSPTRedirectPriority() {
    remove_action('template_redirect', 'sptRedirect');
    add_action('template_redirect', 'sptRedirect', 1);
}
add_action('init', 'adjustSPTRedirectPriority', 99);

0