<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WP First Aid &#187; the_shortlink</title>
	<atom:link href="http://wpfirstaid.com/tag/the_shortlink/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpfirstaid.com</link>
	<description>It&#039;s WordPress ... anything is possible!</description>
	<lastBuildDate>Tue, 17 Jan 2012 16:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Add the_shortlink()</title>
		<link>http://wpfirstaid.com/2010/07/add-the_shortlink/</link>
		<comments>http://wpfirstaid.com/2010/07/add-the_shortlink/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 20:20:35 +0000</pubDate>
		<dc:creator>The Doctor</dc:creator>
				<category><![CDATA[Functions]]></category>
		<category><![CDATA[the_shortlink]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wpfirstaid.com/?p=698</guid>
		<description><![CDATA[I believe there are many reasons for themes to use this function or add it to your WordPress web site. I will briefly discuss a couple of the ones that come to mind. Note, if you are using the default permalink structure this may not be for you as the_shortlink() creates a URL that looks [...]]]></description>
			<content:encoded><![CDATA[<p>I believe there are many reasons for themes to use this function or add it to your <a href="http://wordpress.org">WordPress</a> web site. I will briefly discuss a couple of the ones that come to mind. Note, if you are using the default <a href="http://codex.wordpress.org/Using_Permalinks">permalink structure</a> this may not be for you as <a href="http://codex.wordpress.org/Function_Reference/the_shortlink"><em>the_shortlink()</em></a> creates a <abbr title="Uniform Resource Locator">URL</abbr> that looks just like it.<sup>1</sup></p>
<p>If you are new to WordPress and are still experimenting with the permalink structure to best fit your needs, you might consider using this function to create internal links for your site. Using the <abbr title="Uniform Resource Locator">URL</abbr> generated by <em>the_shortlink()</em> will always resolve correctly, using the verbose <abbr title="Uniform Resource Locator">URL</abbr> of the permalink structure may cause issues if you change the structure and do not <strong>manually edit all</strong> the internal links you have previously posted.</p>
<p>Please note, by &#8220;internal links&#8221; I am refering to the links used within the content of a post or page on your site pointing to another post or page on your site. A WordPress installation has the &#8220;smarts&#8221; to correctly resolve the links it generates if you change the permalink structure but it will not go back and &#8220;fix&#8221; anything you manually typed yourself as part of your page or post entry.</p>
<p>There is great potential for the user, the designer, and the developer using this function. I recommend adding it to all themes. Here is the most basic default usage of <em>the_shortlink()</em>:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php the_shortlink(); ?&gt;</pre>
<p>This is the code I have decided to use on this site:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php the_shortlink( __('Short Link'), '', ' &amp;#124; ', '' ); ?&gt;</pre>
<p>&#8230; which you can see just after the comments or subscribe link in the post meta details.</p>
<p>Of course you can always use the &#8216;Get Shortlink&#8217; button found on the page and post administration panels to get your shortlink, but making use of this single line of code allows your readers to gain that same benefit, too.</p>
<div class="nota-bene">
<ul>
<li>NB: If you have the <a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats</a> plugin installed and activated, the_shortlink() function will use the <a href="http://wp.me">wp.me</a> link shortening service; and, it will retain all of the usefulness I noted above.</li>
</ul>
<ol>
<li>Sept. 9, 2010: Recent testing has shown the &#8220;Get Shortlink&#8221; button on the Edit Post panel will not appear unless a permalink structure other than default is used. This also affects <em>the_shortlink()</em> display functionality.</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wpfirstaid.com/2010/07/add-the_shortlink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

