NeutralAxisTwitter

YOURLS for Self-hosted Short URLs

by on Dec.19, 2009, under Blogging, Linux
Visited 4881 times, 6 so far today

With the plugin installed, you need to edit some settings.  If like this installation, your self-hosting, you’ll want to choose that your YOURLS installation is local instead of remote.

Now when you create a post and publish it, a short URL will be automatically generated, and depending on how you chose your settings, sent to twitter.  If you chose not to send a tweet, you can do it manually for each post from the page where you write the post.

And a final note that there are three template tags that the YOURLS plugin makes available.

wp_ozh_yourls_url()
Will echo a HTML link with short URL (will generate it on the fly if needed) for the current post.
Example output: <a href="http://ozh.in/j5" rel="nofollow alternate shorter" title="short URL">http://ozh.in/j5</a>
Suggested use: in the loop, in single.php, in page.php

wp_ozh_yourls_head_linkrel()
Will output a <link/> in <head> for the current post
Example output: <link rel="alternate short shorter shorturl" href="http://ozh.in/j5" />\n
Suggested use: in header.php, if is_single() or is_page()

wp_ozh_yourls_raw_url()
Will return (or echo if you pass true to it) the short URL, with no HTML tag or anything else. Just the raw URL.

Pages: 1 2

:, ,


Tweet ThisFacebook ShareRight Click & Copy URL

1 Comment for this entry

Leave a Reply

See Commenting Guidelines

Notify via Email Only if someone replies to My Comment

Spam protection by WP Captcha-Free

Visit our friends!

A few highly recommended friends...