Custom post type permalinks not working
-
Hello all. I’ve done hours and hours of research on the matter and have tried every tip/trick I’ve found online to no avail. Here’s what’s happening:
Permalinks (any variation) do not work for my custom post types however they work just fine for regular posts and pages.
I have WordPress 3.5.1 installed on my MediaTemple Grid Server (shared, no access to httpd.conf) with a custom theme I’ve created. All works as expected. My theme has several custom post types, let’s use news for this example. The .htaccess file created by WordPress is correct and has the correct permissions. I’ve chosen the Post name (/%postname%/) permalink structure for this example as well. Note, I do not have any plugins installed, this is for the most part a bare installation.
When browsing to the following URL:
https://example.com/news/news-1/ (not a real URL)
I am redirected to my homepage, even though my theme includes a custom 404 error page (404.php).
I’ve tried flushing the rewrite rules using:
flush_rewrite_rules(true);
And explicitly setting the rewrite option to:
"rewrite" => array("slug"=>"news","with_front"=>false)
I have several other installations on my server that work just fine however they haven’t been updated to 3.5.1. I’ve also noticed my host has recently upgraded to PHP version 5.3.15 — not sure if any of that matters.
- The topic ‘Custom post type permalinks not working’ is closed to new replies.