WordPress.org

Ready to get started?Download WordPress

Forums

No need for tinyurl with this tip -- use "ugly" & "pretty" permalinks (4 posts)

  1. rockypersaud
    Member
    Posted 5 years ago #

    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="http://domain.com/?p=<?php the_ID(); ?>">Short Permalink</a>

    See http://spacechannel.tv/ for example.

  2. zaussome
    Member
    Posted 5 years ago #

    Wow, I never would have even thought of that. :P Thanks!

  3. Dgold
    Member
    Posted 5 years ago #

    Cool tip. ^^

    Another permalink tip, for anyone who didn't know.... If you have pretty Permalinks turned on (WP Admin > Settings > Permalinks) then you automatically have an RSS feed link for every Category on your site. Just put /feed at the end of the URL for your category page, or your homepage, and you'll see the RSS. Easy RSS link to give out.

  4. rockypersaud
    Member
    Posted 5 years ago #

    good one, Dgold!

Topic Closed

This topic has been closed to new replies.

About this Topic