I have custom post type posts with the . character in the post_name field (thus the permalink) and it does not resolve to the correct page template. In this case instead of going to single-cptslug.php the permalink resolves to index.php. The post_name field gets it’s data from a custom field and is updated via a custom query:
$wpdb->query(“UPDATE ” . $wpdb->prefix . “posts SET post_name = ‘” . $slug . “‘ WHERE ID = ” . $post_id);
Where $slug is something like 188.8.131.52
I’m thinking the solution here may involve modifying the .htaccess file but I’m not sure and also have little to no .htaccess experience. Any help appreciated!