• 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m having the same problems and can’t seem to find the solution. I can get an excerpt of my post but when I click the read more link I get “page not found”

    Were you able to find a solution to this after?

    I keep reading to update my permalinks..that does nothing though…

    Whenever I’ve had this problem, I’ve just had to remember to reset my permalinks. You probably made your Custom Post Type after you set your permalink structure, so you gotta reset them…

    Just go to Settings > Permalinks > go back to the default, SAVE, then go back to your custom structure, SAVE… you should be back up and running.

    I had this same problem as well. A designer had left a rogue flush_rewrite_rules(); in our theme’s functions.php file. Made it impossible to track down by deactivating plugins. Look around for those, and remove any unnecessary ones.

    Hope that helps!

    Wow, this saved my day. Couldn’t figure out why my custom plugin wasn’t working, and the reason was the theme being used was running flush_rewrite_rules 4 times every pageload!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom post type permalinks not working’ is closed to new replies.