Passer la navigation

[Résolu] Odd URL issue

This support ticket is created Il y a 4 years, 11 months. 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.

Ce sujet contient 2 réponses, a 2 voices.

Dernière mise à jour par chrisC-25 Il y a 4 years, 11 months.

Auteur
Publications
#1836395

Hi,

I am not sure what is happening. I have a CPT and the url structure is like this:
lien caché

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

Any idea what is happening?

Thanks

#1836787

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01: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:

lien caché

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

lien caché

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.