Yes, but it’s not a nice solution. I didn’t have time to figure out how the permalink functions work. Or I couldn’t figure it out after a week of late nights. I just needed this for one page ID. I changed it in wp-includes/canonical.php. I added one line to ignore the function for my page ID. A better way is to use a custom field if you have multiple pages you want this for:
if ( $do_redirect ) {
//CHR this line will exclude permalink translation for a single page
//Use it to call a page with dynamic page generation code
if ( get_query_var('page_id') == "1137" ) return false;
// CHR end modification for 31 directory
// protect against chained redirects
if ( !redirect_canonical($redirect_url, false) ) {
wp_redirect($redirect_url, 301);
exit();
} else {
// Debug
// die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) );
return false;
}
} else {
return $redirect_url;
}
Remember to make a backup copy after the change. The next WordPress upgrade will overwrite this.