Skip Navigation

[Resolved] The URL structure isn't as expected

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by jonS-4 5 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1230201

I am trying to: keep a consistent structure in the URL paths

Link to a page where the issue can be seen: hidden link

I expected to see: the path in the single page (hidden link) to match the archive page (hidden link) so single page should be hidden link

Instead, I got: this structure - hidden link

#1230277

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jon,

Thank you for contacting our support forum.

Your single page items are of custom post types created in Types correct?

It could be that the post type slug is "dpl-product", could you confirm this .

Please let me know.

Thanks,
Shane

#1230278

Hi Shane

Yes, it is a custom post type and the slug is "dpl-product". But the slug is mandatory so I'm not sure what I should put there instead.

Thanks for the speedy reply, especially as it's the weekend. I'm very grateful.

Jon

#1230281

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jon,

So right now i'm assuming that this is the URL you want based on what I can see.

example.com/cpt-slug/cpt-category/post

In you terms in would be.

example.com/product/moving-lights/clay-paky-mythos-2

For the product to be in the URL you must edit your cpt settings and change the slug to products. The moving-lights taxonomy is this from the default wordpress category ?

Thanks,
Shane

#1230286

Hi Shane

Yes, the moving-lights taxonomy is from the default wordpress category.

'products' is a reserved slug, I believe. Also, it would still lose the taxonomy structure.

So, this archive page:
hidden link

has three products (which are a CPT) and the first one should be this URL:
hidden link

but instead is:
hidden link

Does that clarify my problem?

Thanks again.

#1230922

Hi again Shane

I just wanted to add that I've tried switching to the Twenty Nineteen theme to rule out any theme issues and it's not made any difference so I've switched it back.

Many thanks

Jon

#1230971

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jon,

Mind If I gained access to check on the structures ?

This might be possible but I can't make any promises that this can work because you've defined your CPT slug as dpl-product. The only way to get that to be just 'product' is by changing the slug itself.

The private fields have been enabled.

Thanks,
Shane

#1231591

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jon,

The Post Type can have the slug "product" but not "products" as you have it because there will be a conflict with the URL's for the Category and the CPT.

The reason for this is that in the settings -> permalinks i see that you category taxonomy slug is "products". I went ahead and changed your CPT slug to "product" so there should be some similarities now.

Please let me know if this is adequate.

Thanks,
Shane

#1231638

Hi Shane

Many thanks for that. I'm afraid this hasn't addressed the issue.

The problem isn't the actual slug, it's the fact that there is the taxonomy hierarchy in the URL for the archive pages but it's completely lost when you go to the single page.

This is an archive page:
hidden link

It has products...moving-lights...spot in the breadcrumbs.

This is one of the single pages from that archive:
hidden link

It loses the products...moving-lights...spot and just has product.

I need the single page to have this URL structure:
hidden link

It also, of course, affects the breadcrumbs (taken from the Yoast plugin) which needs to be consistent.

Does that help clarify the issue?

Cheers

Jon

#1231648

Hi again

Actually, I think we can close this. I've spotted it's a WordPress issue (and possible Yoast) which is causing this. I've made some tweaks to the settings and the breadcrumbs are now much better and, probably, as good as I can get them.

Thanks again for your time, I really do appreciate it. I'll close this thread and come back to you if I hit any further issues.

All the best

Jon

#1231650

My issue is resolved now. Thank you!