Code for better match
-
Currently the requested url is matched against the entire permalink. I think it would be better instead to match it to the slug of the existing posts.
function wbz404_rankPermalinks
in functions.php could use the following code for a better match.$slug = explode('/',$urlParts['path']); $slug = array_pop($slug); $levscore = levenshtein($url, $slug,1,1,1);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Code for better match’ is closed to new replies.