Oh, 200 characters (from strlen()) is a lot different than 200 words ??
There’s not enough context in your posted code. How are you getting the permalink? The href attribute didn’t make it into your posted code. FWIW, using the post’s ID as a p=
URL query string will take you to a single post regardless of permalink settings. As in https://example.com/?p=1234
When you post code in these forums, please use the code button or demarcate with backticks. When you don’t, the forum’s parser will corrupt your code, making it unusable for testing or copying as working code. I tried to fix your code, but there wasn’t enough to work with.