@hm-it,
The following URL on my test site shows regular blog posts that are in a “News” category (added under Posts->Categories in the admin area):
http://localhost:8888/category/news/
… and clicking on a link in that list looks like this:
http://localhost:8888/another-post/
… without it adding any category string to the URL.
My News CPT plugin creates its own URL path with /news/
at the root of all its URLs, without the /category/` part:
http://localhost:8888/news/
I tested this while my test site was still at 4.0.0, and after upgrading it to 4.0.1, and all the regular blog and ‘news’ links worked and didn’t run into each other (no 404s).
I can think of four (4) troubleshooting things you can try, in order of increasing difficulty:
(1) Change the name of the <em>News</em> category in your blog to something else. (My plugin is designed to section off “newsy” items from the blog entirely; so, having a <em>News category</em> may be redundant.) However, I can’t anticipate every possible use-case, so you may need that category to be that exact name.
(2) Check Settings->Permalinks, in your admin area. 4.0.1 could have surfaced a bug that caused something in your set-up to change the “Custom Structure” of the permalinks to /%category%/%postname%/
. When I changed to that on my test site, it broke my individual blog links in exactly the same way you described above. You’ll need to change the /%category%
part to something else. I personally like to add /blog
to the front of the permalink structure, but I work on sites with lots of static pages as well as blog posts, so adding “blog” makes the Google Analytics for blog posts easier to parse.
(3) Check if you are using a plugin, like the one mentioned in <a href=”http://stackoverflow.com/questions/17798815/remove-category-tag-base-from-wordpress-url-without-a-plugin”>http://stackoverflow.com/questions/17798815/remove-category-tag-base-from-wordpress-url-without-a-plugin</a>, that may be messing with the permalinks similar to what I described in (2) above. If that is now causing the conflicting URLs, you’ll need to see if that other plugin’s settings can help.
(4) As a last resort, if you have to have that <em>News</em> category just as-is, and you want to change the URLs for my plugin, you can what WordPress uses for my URLs by changing some lines in my plugin files. (Changing the filename doesn’t affect URLs.) You would change the line in the custom post type definition array to use a slug different than /news
. This is the section that would change:
'rewrite' => array(
'slug' => 'news',
'with_front' => false
),
Changing this will not break any of your internal links or cause you to lose any of the News Items you already have–it’s merely cosmetic–but if other people have linked to your News Items, those links would break. You’d probably want to use a plugin like Quick Page/Post Redirect Plugin to bulk-add redirects to your News Items from their old names to the new names with your new ‘news’ slug.
I hope one of these things helps.