Fix for when your WordPress URL is diff than Site URL
-
This plugin doesnt quite generate the proper URL when your WordPress URL and your Site URL (found in the General Settings) are different.
For example, if your WOrdPress URL is https://wp.example.com and your Site URL is https://www.example.com/blog
This is a very simple mod. Locate the
wps_getUrlPath
function towards the bottom of functions.php and replace it with:function wps_getUrlPath($url) { $path = str_ireplace(get_option('home'), '', $url); $path = $path{0} == '/' ? substr($path, 1) : $path; return $path; }
Then look for
wps_redirect
at the top of actions.php and add this as the first line:if(is_admin()) return;
- The topic ‘Fix for when your WordPress URL is diff than Site URL’ is closed to new replies.