No need for tinyurl with this tip — use “ugly” & “pretty” permalinks
-
With the twitterification of facebook, you see everyone using services like tinyurl or snurl etc. to post short urls that redirect to longer permalinks, in order to save txt characters, or the classic use of emailing a link to friends without breaking the link with a wrapped url.
Whenever I see someone do that with a wordpress post, I want to cry. WordPress already provides you with a short permalink, even if you use “pretty” permalinks because you believe the hype that it is better for search engines to find. The old “ugly” formatted link still works, people, redirecting to the post’s “pretty” url.
All you need is to put the_ID(); into a link to get it to work, like so:
<a href="https://domain.com/?p=<?php the_ID(); ?>">Short Permalink</a>
See https://spacechannel.tv/ for example.
- The topic ‘No need for tinyurl with this tip — use “ugly” & “pretty” permalinks’ is closed to new replies.