What aspect of the resulting url is supposed to provide the available filters?
Also for my reference, what are the taxonomy and post type slugs set for your content?
Beyond that, I think it’s all using the URL structures that WordPress is determining should be used. The website/cpt/tax-item example, I’m assuming is supposed to be the post type slug followed by the taxonomy term?
The CPT is yuma-bus-tours (with rewrite from yuma_bus_tours). The taxonomy is ‘month’. For testing, I have 3 months and the tours should be filtered by the individual months. It works, but the url will be website/month/january, not website/yuma-bus-tours/month/january. I just added the Custom Post Types Permalinks plugin. That gives me the correct url, but then it’s empty.
I just can’t figure out what’s set up wrong.
Difficult to say exactly what may be going on. We don’t handle permalink customizations at all, that’s left up to plugins like https://ww.wp.xz.cn/plugins/custom-post-type-permalinks/ which is the same one I believe you mention above, or similar. However, that also has me wondering if the chosen settings you picked is causing the query to not find any matches.
What settings in CPT UI affect permalinks? I have the CPT and the taxonomy pointed at each other of course. Is there anything else in the setup that would affect the permalinks? I’m filtering with WordPress menus.
I could send you screenshots of how I have CPT UI set up if that would help or send you a login.
The only thing we directly provide UI for is customizing the individual slugs for a given post type or taxonomy, much like how you set “yuma-bus-tours” for the URLs. Beyond that, everything is handled by WordPress core with what gets passed in to the register_post_type and register_taxonomy functions. The closest other thing I can think of that would affect permalinks at all is just that we flush the permalink rules on save of a post type or taxonomy, to make sure any changes get accounted for there.
So none of the other settings affect permalinks at all? What does rewrite_withfront do? And hierarchical doesn’t change anything to do with permalinks?
From the codex, that’s for this:
'with_front' => bool
Should the permalink structure be prepended with the front base.
Example: if your permalink structure is /blog/, then your links will be:
false->/news/,
true->/blog/news/.
Defaults to true
So a missed detail in my previous reply, but also nothing custom-created by CPTUI itself. We’re just UI to collect arguments to be passed to the WP core functions that I mentioned earlier.
https://codex.ww.wp.xz.cn/Function_Reference/register_post_type#rewrite
Got it – thanks. For some reason changing to true doesn’t make a difference. I’m finally realizing the filtering works just fine and the exact url doesn’t really make a big difference. Now to convince the client.
Thanks for your help! It’s a great plugin – have used it quite a bit.
let us know if you need anything else.