<?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>the hidden rock {dot} com &#187; WordPress</title>
	<atom:link href="http://thehiddenrock.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://thehiddenrock.com</link>
	<description>a blog by kasia lorenc</description>
	<lastBuildDate>Thu, 20 Oct 2011 21:04:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Learning WordPress shortcodes</title>
		<link>http://thehiddenrock.com/learning-wordpress-shortcodes/2009-02-19/</link>
		<comments>http://thehiddenrock.com/learning-wordpress-shortcodes/2009-02-19/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 20:29:46 +0000</pubDate>
		<dc:creator>kasia</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shortcodes]]></category>

		<guid isPermaLink="false">http://thehiddenrock.com/?p=334</guid>
		<description><![CDATA[I've used WordPress shortcodes before (in fact I'm using a few on this site) but I never really understood how they worked, and more importantly, how to create them. Today we'll take a look at what WordPress shortcodes are, how they work, and how to create them for your own blog. ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used WordPress shortcodes before (in fact I&#8217;m using a few on this site) but I never really understood how they worked, and more importantly, how to create them.</p>
<p>Usually you find them in plugins, like the <a href="http://ideasilo.wordpress.com/2007/04/30/contact-form-7/">Contact Form 7</a> plugin which I&#8217;m using on <a href="http://thehiddenrock.com/contact/">this page</a>. Whenever I want to add a contact page to my site all I have to do is type in <strong>[ CONTACT - FORM ]</strong> and my fully functional contact form appears as if by magic.</p>
<p>Pretty cool huh?</p>
<h3>How do shortcodes work?</h3>
<p>Shortcodes started in WordPress 2.5 with the introduction of a special set of functions called <strong>Shortcode API</strong>. As the <a href="http://codex.wordpress.org/Shortcode_API">WordPress Codex</a> explains <em>&#8220;the API handles all the tricky parsing, eliminating the need for writing a custom regular expression for each shortcode.&#8221;</em> So the API allows the shortcodes to perform whatever they&#8217;re supposed to perform, and it does this automatically without you even knowing it.</p>
<p>All you do is add some php code to your functions.php file and you&#8217;re ready to go!</p>
<h3>Creating your very own shortcodes</h3>
<p>The WordPress codex does get into details on how shortcodes work, it explains the attributes, the output, the limitations and the like, but like most WP codex lingo, it&#8217;s not all easy to understand &#8230; and it&#8217;s definitely not a good how-to tutorial.</p>
<p>No worries, here&#8217;s one that is &#8212; <a href="http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcodes</a> by Smashing Magazine is a great tutorial, especially for beginners.</p>
<ul>
<li>It gives a good a few good examples of how shortcodes work</li>
<li>Walks you through creating a simple shortcode so you get the hand of it</li>
<li>Then goes into creating more advanced shortcodes</li>
</ul>
<p>The best part is that once you go through all of the above, you&#8217;ll get to create some really neat shortcodes for your blog like:</p>
<ul>
<li>A &#8220;Send to Twitter&#8221; shortcode</li>
<li>A &#8220;Subscribe to RSS&#8221; shortcode</li>
<li>A shortcode for easily inserting Google AdSense anywhere</li>
<li>A shortcode for embedding and RSS reader</li>
<li>A shortcode that lets you get your posts from the WP database</li>
</ul>
<p>Go ahead and give them a try! I&#8217;m going to be testing a few of these myself, so I&#8217;ll let you know how they turn out for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://thehiddenrock.com/learning-wordpress-shortcodes/2009-02-19/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

