Sillybean
WordPress Hidden Gems: the_shortlink() and the default permalink structure
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.
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 Beginning WordPress 3.
Posted on September 16, 2010 at 10:59 am
in WordPress ·
comment
Part of the WordPress Hidden Gems series
Sharing this post? The short URL is: http://sillybean.net/?p=6248





