Fixing Broken Paging Links in WordPress 3.0 Running on Windows

I posted an article earlier this year with instructions on removing the duplicate index.php in paging links produced by WordPress running on Windows. Today I finally upgraded from WordPress 2.9.3 to WordPress 3.0.3 and it seems that the clean_url() function in formatting.php has been renamed to esc_url(). The fix is still the same.

function esc_url( $url, $protocols = null, $_context = 'display' ) {
	$original_url = $url;
 
	if ( '' == $url )
		return $url;
 
	//Added line to Fix Broken Paging Link Problem
	$url = str_replace('index.php/Index.php','index.php',$url);
 
	...
 
	return apply_filters('clean_url', $url, $original_url, $_context);
}

This fix has to be applied EVERY time WordPress is upgraded. You have been warned.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Reddit
  • DotNetKicks
  • Technorati
  • TwitThis

Leave a Reply