post permalinks with dot in url don’t resolve to correct page template

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 90.79.2.6

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!

Read more here:: post permalinks with dot in url don’t resolve to correct page template

Leave a Reply

Your email address will not be published. Required fields are marked *