I have a custom post type called
produce set up in WordPress and a custom taxonomy called
The URL format for posts in this custom post type is in this format
http://mywebsite/produce/%produce_category%/%postname%/. Of course
%postname% get substituted accordingly, a working example url would be
What I would like to do is show the produce_category custom taxonomy archive if a user visits
http://mywebsite/produce/%produce_category%, without specifying post name at the end, e.g
http://mywebsite/produce/fruits-and-vegetables to show all produce in fruits-and-vegetables produce_category.
Besides that when a user visits
http://mywebsite/produce/ I would like to show all the produce archive. EDIT: I have this working now.
I know how to create the archive pages totally fine and have no problem with that. I am stuck at creating permalinks. When I visit
http://mywebsite/produce/%produce_category% I get a 404 error.
I'm looking for advise on the best way to implement this. Currently I am using Custom Post Type Permalinks and CPTUI.
This gives the front-side produce_category taxonomy archive url as
http://mywebsite/produce/produce_category/fish-and-seafood/ when what I want for the archive is
Please help with suggestion on the best way I can achieve the custom taxonomy url.
Thank you all.