• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Books
    • Content Strategy for WordPress (2015)
    • WordPress for Web Developers (2013)
    • Beginning WordPress 3 (2010)
  • Blog
    • Content Modeling for WordPress
    • WordPress Hidden Gems
    • Web Design
  • Work
    • Presentations and Interviews
    • on GitHub →
    • MLIS Class Projects (2019-2022)
    • Portfolio (2002-2019)
    • WordPress Plugins

Stephanie Leary

Writer, Front End Developer, former WordPress consultant

  • About
    • Press Kit
    • Presentations and Interviews
  • Contact Me

WordPress Hidden Gems: the_shortlink() and the default permalink structure

September 16, 2010 Stephanie Leary Leave a Comment

There’s a new function in WordPress 3.0, the_shortlink(). You can place this in your single.php theme file to print a shorter URL for the current post if your permalink structure results in something very long.

The Permalinks Settings screen
The WordPress.com Stats plugin's options screen

If you have the WordPress.com Stats plugin installed, you’ll get short links using the wp.me service. However, if you’d prefer to use your own domain, just turn the wp.me links off in the plugin’s settings (under Plugins → WordPress.com Stats). WordPress will begin using your default permalink structure instead (unless you have yet another plugin that’s altering your shortlinks). The default structure always works, even if you’ve chosen one of the longer ones.

Find all the WordPress Hidden Gems in [link id=”2675″]Beginning WordPress 3[/link].

WordPress Permalinks, shortlinks, wp.me

This is an excerpt from Content Strategy for WordPress.My latest books are Content Strategy for WordPress (2015) and WordPress for Web Developers (2013). Sign up to be notified when I have a new book for you.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer

My Books

I’m a front end developer at Equinox OLI, working on open source library software. I was previously a freelance WordPress developer in higher education. You can get in touch here or on LinkedIn.

Copyright © 2025 Stephanie Leary · Contact