WordPress.org

Ready to get started?Download WordPress

Forums

NEW! Short URLs (7 posts)

  1. Description:

    This REALLY simple plugin allows you to use a short URL to your post. It also redirects any page loads of "index.php?p=#" to the permalink of the post.

    This plugin is also smart enough to not try and redirect any page loads of "index.php?p=#" when you aren't using permalinks. (Although there is really no need to be using this plugin if you aren't using permalinks as your URL is already about as short as it can get.)

    Basically, I wanted like ?p=#, but that wasn't ugly.

    Usage:

    Click here to see it in action: http://viper007bond.com/post/38. Clicking that link will take you to a post about WordPress v1.5.2 being released and note that the URL in your address bar is now the full permalink.

    Also try visiting this link that I don't want people really using: http://viper007bond.com/index.php?p=38

    The "38" is the post ID of that post. Easiest way to find the ID of your post is to hover over your edit link, or if you don't have one, look on the manage page in your WordPress admin.

    You could also place some code like this somewhere in The Loop if you wanted to create short links on your site:

    <small><a href="<?php bloginfo('url'); ?>/post/< ?php the_ID(); ?>" title="Short URL to this post">Short URL</a></small>

    More details here: http://www.viper007bond.com/wordpress-plugins/short-urls/

  2. Jonathan Dingman
    Member
    Posted 8 years ago #

    Good plugin for seach engine optimization, good work!

  3. Cypher
    Member
    Posted 8 years ago #

    Personally I don't think that short url necessarily infers any ease of use/understanding. That is, referring to "/post/38" means virtually nothing to a visitor while "archives/2005/08/14/wordpress-v152-released/" gives an idea of what the post is about in a quick glance.

    Also, wouldn't search engines be able to use a descriptive URL to bring up posts as opposed to a non-descriptive one??

    Regards

  4. That's exactly why I'm using "archives/2005/08/14/wordpress-v152-released/" for my permalink structure.

    However, IMO, http://www.viper007bond.com/archives/2005/08/14/wordpress-v152-released/ is a bit much to be posting here or in an e-mail or whatever. Hence the purpose of my short URL. I think of it like a TinyURL to my post.

    And the plugin also sends a HTTP 301 header when redirecting so that neither /post/# or index.php?p=# gets indexed by search engines.

  5. swordfish
    Member
    Posted 8 years ago #

    viper,

    there is a problem with the gravatar signup plugin in your blog.
    I ticked to get a password and entered teh password along with the comment and this was showed:

    Fatal error: Call to undefined function: submit() in /home/viperaa/public_html/wordpress/wp-content/plugins/gravatar-signup.php on line 145

    please check.

  6. Oi. Thanks for the heads up. I didn't make that plugin, but I'll go check it out to see what's up.

    Oh, and I answered your question: http://www.viper007bond.com/wordpress-plugins/short-urls/#comment-74

  7. Cypher
    Member
    Posted 8 years ago #

    Viper,

    Ahh ok! Should've looked into the plugin in a little more detail before speaking. :) As long as the only URL that gets indexed is the full-featured one your plugin is a great idea. :-D

    Regards

Topic Closed

This topic has been closed to new replies.

About this Topic