permalinks – Shortlinks work only for logged in users
In my wordpress site, i can see this line in the code:
<link rel="canonical" href="https://example.com/?p=7736" />
But only if i am logged in.
If i’m not logged in I see the pretty link and canonical.
And indeed if I will try the short-link when I’m logged in I will get the right post, but if not logged i will get “page not found”.
I have tried adding some permalink plugins, but none of them solves the issue.
I do want to be able to use the shortlinks for non-logged-in users also.