Enable Shortlink in WordPress 3.0


Sponsored Links




WordPress 3.0 built in with many many new featured, Integrated WordPress MU, New WordPress 3.0 Nav Menu, New Default Theme and many more. Shorlink feature is another nicely feature in WordPress 3.0. Default WordPress 3.0 shortink on you header front end will be come like this , but if you are using WordPress Stats, you’ll have WP.ME integration shortlink.

Enable WordPress Shortlink - Lizzy Caplan

Enable WordPress Shortlink - Lizzy Caplan

How to integrate Shortlink on our themes? You can use with 4 parameters

* @param string $text Optional The link text or HTML to be displayed.  Defaults to 'This is the short link.'
 * @param string $title Optional The tooltip for the link.  Must be sanitized.  Defaults to the sanitized post title.
 * @param string $before Optional HTML to display before the link.
 * @param string $before Optional HTML to display after the link.
 */
the_shortlink($text = '', $title = '', $before = '', $after = '')

And here the code on your theme

if ( function_exists('the_shortlink') ) the_shortlink( __('Shortlink'), __('Shortlink on this post'), ' · ' );

You can play around with wp_get_shortlink too, to integrate on yoy WordPress 3.0 theme, add it on your functions.php

add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );

To remove this functions, use this code

remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );

It’s only example, you can made it more better on Enable Shortlink in WordPress 3.0, thanks for WP Enginer and bueltge

Photo courtesy of Egotastic

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Generate Quick Short URL on Self Hosted WordPress 3.0

Wordpress 3.0 is released and Demo of “Get Shortlink” on WordPress 3.0. Here How To Enable Multiple Site Network Options Like WordPress MU in WordPress 3.0 Read More

WordPress › URL Shortener « WordPress Plugins

Or if WordPress 3.0: http://codex.wordpress.org/Function_Reference/the_shortlink. Available hooks and filters. fts_use_shortlink (Action Hook) Read More

WordPress.com — Get a Free Blog Here

Free blogs managed by the developers of the WordPress software. Includes custom design templates, integrated statistics, automatic spam protection and other features. Read More

Template Changes/Tags for WordPress 3.0 - NSpeaks | Blogging and

WordPress 3.0 will soon be released with some heavy duty featureset which will enable WordPress shortlink() and get_shortlink() hooks. More Information by WPEngineer and OttoPress. Login Form. WordPress 3.0 Read More

WordPress 3.0: The 5 Most Important New Features

Here are a few of the minor feature enhancements arriving in WordPress 3.0: Get Shortlink are you enable it? Read More


One Response to Enable Shortlink in WordPress 3.0

  1. Pingback: Tweets that mention How To Enable Shortlink in WordPress 3.0 # WordPress Tricks & Tips -- Topsy.com

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>