<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: WordPress 2.5 Shortcodes</title>
	<atom:link href="http://xavisys.com/wordpress-25-shortcodes/feed/" rel="self" type="application/rss+xml" />
	<link>http://xavisys.com/wordpress-25-shortcodes/</link>
	<description>Control Your Internet</description>
	<pubDate>Sun, 06 Jul 2008 03:28:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Anup</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1759</link>
		<dc:creator>Anup</dc:creator>
		<pubDate>Tue, 10 Jun 2008 20:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1759</guid>
		<description>Thanks for this article. One note, I found that the method signature to handle the short code had to have the content parameter be optional. That is this:

add_shortcode('mycode', 'yourFunction');

function yourFunction ($attr, $content &lt;strong&gt;= null&lt;/strong&gt;) {
   // etc...
}

Without the above, I was getting error messages trying to just use

[mycode]</description>
		<content:encoded><![CDATA[<p>Thanks for this article. One note, I found that the method signature to handle the short code had to have the content parameter be optional. That is this:</p>
<p>add_shortcode(&#8217;mycode&#8217;, &#8216;yourFunction&#8217;);</p>
<p>function yourFunction ($attr, $content <strong>= null</strong>) {<br />
   // etc&#8230;<br />
}</p>
<p>Without the above, I was getting error messages trying to just use</p>
<p>[mycode]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alibandito</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1700</link>
		<dc:creator>alibandito</dc:creator>
		<pubDate>Tue, 03 Jun 2008 06:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1700</guid>
		<description>Aaron, here it is: 
a) shortcode as plugin:

function shortcode_readrecent() { 
wp_get_archives('type=postbypost&#38;limit=15');} (or other template-tag)
add_shortcode('readrecent', 'shortcode_readrecent');

b) modified functions.php:   add_filter('widget_text', 'do_shortcode');

c) add to text-widget: [readrecent]</description>
		<content:encoded><![CDATA[<p>Aaron, here it is:<br />
a) shortcode as plugin:</p>
<p>function shortcode_readrecent() {<br />
wp_get_archives(&#8217;type=postbypost&amp;limit=15&#8242;);} (or other template-tag)<br />
add_shortcode(&#8217;readrecent&#8217;, &#8217;shortcode_readrecent&#8217;);</p>
<p>b) modified functions.php:   add_filter(&#8217;widget_text&#8217;, &#8216;do_shortcode&#8217;);</p>
<p>c) add to text-widget: [readrecent]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron D. Campbell</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1699</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Mon, 02 Jun 2008 21:25:35 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1699</guid>
		<description>albandi: could you give me an example of what you are trying to do?  Maybe a snippet of the code you are using?</description>
		<content:encoded><![CDATA[<p>albandi: could you give me an example of what you are trying to do?  Maybe a snippet of the code you are using?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: albandi</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1697</link>
		<dc:creator>albandi</dc:creator>
		<pubDate>Mon, 02 Jun 2008 18:56:19 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1697</guid>
		<description>now I try to include template-tags in a shortcode-function, but it doesn't work. 
Is it possible?</description>
		<content:encoded><![CDATA[<p>now I try to include template-tags in a shortcode-function, but it doesn&#8217;t work.<br />
Is it possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: albandi</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1695</link>
		<dc:creator>albandi</dc:creator>
		<pubDate>Mon, 02 Jun 2008 06:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1695</guid>
		<description>thanks Aaron!! It works fine :-) I'm happy!!</description>
		<content:encoded><![CDATA[<p>thanks Aaron!! It works fine <img src='http://xavisys.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> I&#8217;m happy!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron D. Campbell</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1673</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Sat, 31 May 2008 15:46:09 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1673</guid>
		<description>albandi: Not by default.  However, the way WordPress applies shorcodes is by adding a filter on the_content:
&lt;code&gt;add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() &lt;/code&gt;
You could add that same filter to "widget_text" and shortcodes should start working in them.  Try adding this line to your theme's functions.php file:
&lt;code&gt;add_filter('widget_text', 'do_shortcode'); &lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>albandi: Not by default.  However, the way WordPress applies shorcodes is by adding a filter on the_content:<br />
<code>add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() </code><br />
You could add that same filter to &#8220;widget_text&#8221; and shortcodes should start working in them.  Try adding this line to your theme&#8217;s functions.php file:<br />
<code>add_filter('widget_text', 'do_shortcode'); </code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: albandi</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1661</link>
		<dc:creator>albandi</dc:creator>
		<pubDate>Fri, 30 May 2008 12:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1661</guid>
		<description>is there a way to add a shortcode to a sidebar textwidget?</description>
		<content:encoded><![CDATA[<p>is there a way to add a shortcode to a sidebar textwidget?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron D. Campbell</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1558</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Wed, 14 May 2008 14:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1558</guid>
		<description>Marcus: Unfortunately there are a lot of reasons.  First, try disabling all your plugins.  If that fixes the problem, re-enable them one at a time until you find the one that is causing the problem.  If that doesn't work, feel free to &lt;a href="http://xavisys.com/contact-us/" rel="nofollow"&gt;contact me&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Marcus: Unfortunately there are a lot of reasons.  First, try disabling all your plugins.  If that fixes the problem, re-enable them one at a time until you find the one that is causing the problem.  If that doesn&#8217;t work, feel free to <a href="http://xavisys.com/contact-us/" rel="nofollow">contact me</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1555</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Wed, 14 May 2008 05:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1555</guid>
		<description>You seem to know a lot about short codes , I got a issues you may be able to help me with. On my wordpress blog my short codes stopped working , at the moment anything with a gallery short code only shows up with [gallery]. before that it all worked well and the galleries showed up. Do you have any idea what could cause them not to show up.</description>
		<content:encoded><![CDATA[<p>You seem to know a lot about short codes , I got a issues you may be able to help me with. On my wordpress blog my short codes stopped working , at the moment anything with a gallery short code only shows up with [gallery]. before that it all worked well and the galleries showed up. Do you have any idea what could cause them not to show up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phalkunz</title>
		<link>http://xavisys.com/wordpress-25-shortcodes/#comment-1493</link>
		<dc:creator>phalkunz</dc:creator>
		<pubDate>Tue, 29 Apr 2008 11:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://xavisys.com/?p=84#comment-1493</guid>
		<description>I just started playing with shortcode. I wrote a short function to display site url. It works fine with Post but it doesn't work with Page at all. For instance, my shortcode is [url]. When put it in a page it shows [url] itself, instead of the site url.

First I assumed that it works only for Post. But in this post of yours and you said "As you can see, shortcodes allow a user to put a code into a post or PAGE". Did I do something wrong? or do I have to write extra code?

Hope to hear from you soon. 

Cheers :)</description>
		<content:encoded><![CDATA[<p>I just started playing with shortcode. I wrote a short function to display site url. It works fine with Post but it doesn&#8217;t work with Page at all. For instance, my shortcode is [url]. When put it in a page it shows [url] itself, instead of the site url.</p>
<p>First I assumed that it works only for Post. But in this post of yours and you said &#8220;As you can see, shortcodes allow a user to put a code into a post or PAGE&#8221;. Did I do something wrong? or do I have to write extra code?</p>
<p>Hope to hear from you soon. </p>
<p>Cheers <img src='http://xavisys.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
