custom-post-type-permalinks icon indicating copy to clipboard operation
custom-post-type-permalinks copied to clipboard

Latest update broke category/postname URLs

Open gaelanlloyd opened this issue 11 years ago • 9 comments

Hi there,

When updating to the newest version of this plugin, pages in a custom post type under a category show up as 404.

We have a custom post type called "event". Those "event" posts can have a category with the slug "event-category" with one of three choices: tradeshow, workshop, user-group.

The custom permalink structure for our events is:

/%event-category%/%postname%/

So, an event categorized as tradeshow would be

/event/tradeshow/post-name/

After updating to the latest version, now when we browse to one of those event pages you get a 404.

Thanks for your help,

Gaelan

gaelanlloyd avatar Apr 22 '15 21:04 gaelanlloyd

Just wanted to add that I rolled back to version 0.9.6 and now it works perfectly!

gaelanlloyd avatar Apr 22 '15 22:04 gaelanlloyd

I tried to update to v1.4.0 as I saw there had been a lot of fixes in the past year, but we still have the same problem. Unfortunately I'm going to have to roll back again to v0.9.6.

gaelanlloyd avatar Mar 07 '16 18:03 gaelanlloyd

@gaelanlloyd If you use flush_rewrite_rules in your code?

Please remove the code.

torounit avatar Apr 06 '16 00:04 torounit

I have the same problem...

yliharma avatar Jun 01 '16 15:06 yliharma

I am also having this problem. I have my custom CPT permalink set to "/%category%/%postname%/". These permalinks now result in a 404 error. MY question is: Is v0.9.6 the latest version where this permalink configuration will work?

SolidDev avatar Jun 02 '16 05:06 SolidDev

@yliharma Please Try execute register_taxonomy before register_post_type.

torounit avatar Jun 28 '16 21:06 torounit

@torounit I tried: the category page works, but the post page "/%category%/%postname% is still a 404. add_action('init', 'mysite_register_taxonomies', 10); add_action('init', 'mysite_register_post_type', 20);

yliharma avatar Jun 29 '16 09:06 yliharma

@torounit I tried: the category page works, but the post page "/%category%/%postname% is still a 404. add_action('init', 'mysite_register_taxonomies', 10); add_action('init', 'mysite_register_post_type', 20);

tklk8 avatar Oct 06 '18 18:10 tklk8