Greetings all….this is rather urgent as site was moved today to new site (using the same domain, just pointing to new folder/db on the server) and one category page refuses to cooperate, unfortunately it’s a highly active one.
On old site we had Custom Post Type of “news”, which when moved to new site was transitioned into a regular Post with a category of “news” assigned to all the posts of that type that were changed.
Single Post URLs are fine because old site didn’t use any category base, just site.com/%postname%
However, when we click on the (new) menu item for the (now) category page (formerly a archive page for the CPT), instead of going to site.com/category/news/ as it should, it is continually redirecting to site.com/news/ (which is the old structure).
Here’s what I’ve done so far to try to find the source of the problem and fix it:
– I’ve flushed the rewrite rules (many times in fact) by updating the Permalinks in Settings>Permalinks;
– I’ve combed through the .htaccess file, nothing there but to be sure I removed it and allowed WP to rebuild a simpler version;
– I’ve searced the DB for any old CPT detritus, found nothing – a SQL query to list post types does not show the old CPT in the list;
I’ve also tried setting up some rewrite rules in the new .htaccess file, with no luck, trying both ModRewrite and Redirect, like so (neither of these worked, yes the server is running Apache):
RewriteRule ^news/(.*)$ category/news/$1 [R=301,NC,L]
(no effect at all)
Redirect 301 /news http://www.[sitename].com/category/news
(this causes circular redirect errors)
The menu item is linked appropriately to the category, but clicking on it you can watch the redirect happen, same if you type in the URL using /category/news…..it switches quickly to just /news and then I get a 404 Page.
The old CPT is no longer registered, there is nothing in .htaccess to cause the redirect (and redirecting back doesn’t work) so there must be something else that I’m missing……how or where might a redirect be hiding? There was no redirect ever on the old site so I have no idea where this is coming from…
Please reply only if you really think you can help…..replies such as “wow that’s a bummer did you try XXX? (XXX being something I list above as already tried) just removes this from the no-replies filter making it less likely I’ll get help from another developer or moderator…..and this really is urgent.
Thanks for viewing, hoping some server experts may chime in!
- The topic ‘Changed CPT to Post, now Category Page won’t work’ is closed to new replies.