Skip Navigation

[Resolved] Odd URL issue

This support ticket is created 4 years 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.

This topic contains 2 replies, has 2 voices.

Last updated by chrisC-25 4 years ago.

Author
Posts
#1836395

Hi,

I am not sure what is happening. I have a CPT and the url structure is like this:
hidden link

However if I use a short version like this:
hidden link
it will still get to:
hidden link
This is great, however for this post:
hidden link
if I use short:
hidden link
it goes here:
hidden link
But if I remove the last "s":
hidden link
it goes here:
hidden link

Any idea what is happening?

Thanks

#1836787

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

WordPress is trying to guess what post you want to display when you enter a URL for a post that doesn't actually exist.

This URL is for the alice-ivy post of the custom post type publishing-roster:

hidden link

Remove the custom post type slug and then it's a page or post:

hidden link

But there is no such page or post with that permalink, so WordPress hunts for something that it thinks matches.

In this case it comes up with the custom post.

In your other example it comes up with the image file with a close match.

It's how WordPress works when it comes to parsing URLs. The solution is to be sure to generate links for your custom posts that your users can find rather than have them guess URLs.

#1836831

Thanks, that is what I was thinking. The team wanted to share these short links and they just happened to work by accident for some and not for others.