<?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>WereWP &#187; shortcode</title>
	<atom:link href="http://werewp.com/tag/shortcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://werewp.com</link>
	<description>Daily WordPress news</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:45:54 +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>How to: use a shortcode to display a message to RSS readers only</title>
		<link>http://werewp.com/tutorials/how-to-use-a-shortcode-to-display-a-message-to-rss-readers-only/</link>
		<comments>http://werewp.com/tutorials/how-to-use-a-shortcode-to-display-a-message-to-rss-readers-only/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 11:15:59 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1510</guid>
		<description><![CDATA[In his latest article, Konstantin demonstrates how to create a shortcode that is going to allow you to add a specific message to your feed readers only. That&#8217;s a simple and easy way to customize your posts a bit more, and ask your RSS readers to come visit from time to time! :) Snippet: A [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>In his latest article, Konstantin demonstrates how to create a shortcode that is going to allow you to add a specific message to your feed readers only.</p>
<p>That&#8217;s a simple and easy way to customize your posts a bit more, and ask your RSS readers to come visit from time to time! :)</p>
<p><a href="http://kovshenin.com/archives/snippet-a-feed-only-shortcode-for-wordpress/">Snippet: A “Feed Only” Shortcode for WordPress</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/tutorials/how-to-use-a-shortcode-to-display-a-message-to-rss-readers-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: use shortcodes outside the Editor</title>
		<link>http://werewp.com/tutorials/how-to-use-shortcodes-outside-the-editor/</link>
		<comments>http://werewp.com/tutorials/how-to-use-shortcodes-outside-the-editor/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 16:19:31 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1392</guid>
		<description><![CDATA[We have already seen how powerful can shortcodes be. A good example was the integration of a tweet box in the content of your WordPress posts. But what about the use of shortcodes outside of the editor? The guys at Wpengineer have prepared a simple tutorial to explain the use the of the do_shortcode function. [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>We have already seen how powerful can shortcodes be. A good example was the integration of a tweet box in the content of your WordPress posts.</p>
<p>But what about the use of shortcodes outside of the editor? The guys at Wpengineer have prepared a simple tutorial to explain the use the of the <em>do_shortcode</em> function.</p>
<p><a href="http://wpengineer.com/2051/use-wordpress-shortcodes-outside-the-editor/">Use WordPress Shortcodes outside the Editor &#8211; Please Note, example-name, Shortcode, Editor, Custom, Field &#8211; WP Engineer</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/tutorials/how-to-use-shortcodes-outside-the-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to: add a twitter dialog box anywhere on your blog</title>
		<link>http://werewp.com/tutorials/how-to-add-a-twitter-dialog-box-anywhere-on-your-blog/</link>
		<comments>http://werewp.com/tutorials/how-to-add-a-twitter-dialog-box-anywhere-on-your-blog/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 10:39:37 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[anywhere]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1355</guid>
		<description><![CDATA[Twitter has become a very useful tool for all bloggers, and allows us to share and promote useful articles to fellow bloggers. Naturally, we have seen more and more twitter functions integrated into our blogs; the latest Official twitter button has even made it easier to integrate twitter buttons on your blog. But what if [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>Twitter has become a very useful tool for all bloggers, and allows us to share and promote useful articles to fellow bloggers. Naturally, we have seen more and more twitter functions integrated into our blogs; the latest <a title="Twitter button" href="http://twitter.com/goodies/tweetbutton" target="_blank">Official twitter button</a> has even made it easier to integrate twitter buttons on your blog.</p>
<p>But what if you do not want of a standard twitter button, but rather of a new and easy way for your readers to contact you via twitter? Luckily, <a title="Twitter @Anywhere" href="http://dev.twitter.com/anywhere/" target="_blank">Twitter @anywhere</a> is here for you, and in that tutorial, we will see how to easily integrate at twitter box to any part of your blog, thanks to this service and the <a title="WordPress shortcodes tutorials" href="http://www.werewp.com/tag/shortcode/" target="_self">WordPress shortcodes</a>!  <span id="more-1355"></span> This can be done in a few easy step, and the result will look as below:</p>
<p style="text-align: center;"><div id="tbox"></div></p>
<p style="text-align: left;">You will be able to customize the width and height of the form, as well as the message appearing by default in the box. Of course, as we will integrate this box with a shortcode, you will be able to integrate this tweetbox everywhere on your WordPress blog.</p>
<p style="text-align: left;">Here are the few steps to follow:</p>
<h2>Create a new Twitter @Anywhere app</h2>
<p style="text-align: left;">Go to <a title="Create new app" href="http://dev.twitter.com/anywhere/apps/new" target="_blank">http://dev.twitter.com/anywhere/apps/new</a>, and create a new app with Read and Write access. The callback URL should be address of your blog.</p>
<h2>Integrate the twitter API code in the header of your theme</h2>
<p>In your theme&#8217;s  <strong>functions.php</strong>, integrate the call the twitter thanks to <a title="Enqueue scripts into the hed of WordPress" href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" target="_blank">wp_enqueue_script</a>, and then integrate the necessary script to integrate a twitter box into the head:</p>
<pre class="brush: php; title: ; notranslate">
$api_key = &quot;Add your twitter app API key here&quot;;
wp_enqueue_script(&quot;twitter-anywhere&quot;,
	&quot;http://platform.twitter.com/anywhere.js?id={$api_key}&amp;v=1&quot;);
add_action(&quot;wp_head&quot;, &quot;twitter_box&quot;);

function twitter_box()
{
	echo '&lt;script type=&quot;text/javascript&quot;&gt;';
	echo 'twttr.anywhere(function (T) {T(&quot;#tbox&quot;).tweetBox({height: 100,width: 400,defaultContent: &quot;&lt;YOUR DEFAULT TWEETBOX CONTENT HERE&gt;&quot;});});';
	echo '&lt;/script&gt;';
}
</pre>
<p>Thus you do not have to modify and clutter header.php with new lines of code, you can do it all through your functions.php file.</p>
<h2>Create the shortcode</h2>
<p>Again in functions.php, add the following lines:</p>
<pre class="brush: php; title: ; notranslate">
function twitterbox_shortcode () {
	return '&lt;div id=&quot;tbox&quot;&gt;&lt;/div&gt;';
}
add_shortcode(&quot;twitterbox&quot;, &quot;twitterbox_shortcode&quot;);
</pre>
<p>And you&#8217;re done ! You can now use the shortcode <strong>[ twitterbox ]</strong> everywhere in your post content, in your theme widgets, and thus display a twitter box for your readers to contact you very easily via Twitter !</p>
<p>Any questions, or remarks? Do not hesitate to comment!</p>
<p><strong>And of course, you can </strong><a title="Jeremy Herve on Twitter" href="http://twitter.com/jeherve" target="_blank"><strong>follow me on twitter</strong></a><strong> too!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/tutorials/how-to-add-a-twitter-dialog-box-anywhere-on-your-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to: integrate Facebook videos on your WordPress blog</title>
		<link>http://werewp.com/tutorials/how-to-integrate-facebook-videos-on-your-wordpress-blog/</link>
		<comments>http://werewp.com/tutorials/how-to-integrate-facebook-videos-on-your-wordpress-blog/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 13:11:20 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1322</guid>
		<description><![CDATA[Facebook is getting more and more popular everywhere on the net. Thanks to the Like button and other Facebook plugins, we can now interact and share content directly from all kinds of websites to Facebook. But what about embedding videos from Facebook to your website? We have discussed about the integration of the Open Graph [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>Facebook is getting more and more popular everywhere on the net. Thanks to the Like button and other Facebook plugins, we can now interact and share content directly from all kinds of websites to Facebook. But what about embedding videos from Facebook to your website?<br />
We have discussed about the <a title="How to integrate Facebook connect on your blog" href="http://www.werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/" target="_self">integration of the Open Graph and Facebook connect</a> earlier on this blog, but today I would like to show you how to embed a Facebook video, without having to copy and paste lines of code into your editor.</p>
<p><span id="more-1322"></span></p>
<p>For that, we will make use of the <a title="Shortcodes explained on the WordPress codex" href="http://codex.wordpress.org/Shortcode_API" target="_blank">WordPress shortcodes</a>, that are a great and easy way to add features to your blog without having to install a plugin.<br />
The idea is quite simple: we have a look at how Facebook videos are created, and then we replicate the embedding into a new shortcode.</p>
<p>Facebook videos have a unique id, that you can find in your address bar when viewing a video on Facebook. That&#8217;s the only element you will need to embed a Facebook video.</p>
<h2>Adding the shortcode to your theme</h2>
<p>In order to add the functionnality to your WordPress install, you will need to add a few lines of code to the functions.php file of your theme. If you do not have such a file, create it. This is easy to do and friendly to <a target="_blank" href="http://www.webhostgear.com/reseller-hosting.php">reseller hosting</a> or any hosts for that matter.</p>
<p>Here is the function:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

//Facebook Video Shortcode
function werewp_fn_fbvideo($atts, $content = null) {
   extract(shortcode_atts(array(
      &quot;id&quot; =&gt; '',
   ), $atts));
   return '&lt;object width=&quot;400&quot; height=&quot;224&quot; &gt;
   &lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
   &lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;
   &lt;param name=&quot;movie&quot; value=&quot;http://www.facebook.com/v/'.$id.'&quot; /&gt;
   &lt;embed src=&quot;http://www.facebook.com/v/'.$id.'&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;400&quot; height=&quot;224&quot;&gt;
   &lt;/embed&gt;
   &lt;/object&gt;';
}
add_shortcode(&quot;fbvideo&quot;, &quot;werewp_fn_fbvideo&quot;);

?&gt;
</pre>
<p>Add it to your file, save, and upload to your server. You&#8217;re done!</p>
<h2>Display the video on your blog</h2>
<p>Let&#8217;s take the example of the video of the latest addition to Facebook services, <a title="Facebook places" href="http://www.facebook.com/places/" target="_blank">FB Places</a>. The URL of the video is as follows: <a title="Facebook Places video" href="http://www.facebook.com/video/video.php/?v=10150257497405484" target="_blank">http://www.facebook.com/video/video.php/?v=10150257497405484</a></p>
<p><a title="Facebook Places video" href="http://www.facebook.com/video/video.php/?v=10150257497405484" target="_blank"></a><br />
The only thing you will need to insert that video on your blog is the id at the end of the URL: <strong>10150257497405484</strong>.</p>
<p>Then, in your visual editor, simply <strong>add </strong><strong>the shortcode fbvideo</strong> where you want your video to appear. Of course, replace the ID by whatever video id you would like to diplay!</p>
<pre class="brush: php; title: ; notranslate">
fbvideo id=&quot;10150257497405484&quot;]
</pre>
<p>And that&#8217;s how it should look! Happy blogging, with one more <a title="Facebook WordPress tutorials" href="http://www.werewp.com/tag/facebook/" target="_self">Facebook</a> feature on your blog!</p>
<p style="text-align: center;"><object width="400" height="224" >
   <param name="allowfullscreen" value="true" />
   <param name="allowscriptaccess" value="always" />
   <param name="movie" value="http://www.facebook.com/v/10150257497405484" />
   <embed src="http://www.facebook.com/v/10150257497405484" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="224">
   </embed>
   </object></p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/tutorials/how-to-integrate-facebook-videos-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Today in WordPress world &#8211; 29/09</title>
		<link>http://werewp.com/links/links-for-2009-09-29/</link>
		<comments>http://werewp.com/links/links-for-2009-09-29/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 14:03:52 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[club]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[permalinks]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/uncategorized/links-for-2009-09-29/</guid>
		<description><![CDATA[There are a few good news and WordPress articles that were published today. The first and most important is the result of the WordPress plugin competition: WordPress Plugin Competition 2009 Winner! « Weblog Tools Collection The winner of the Grand Prize of the WordPress Plugin Competition 2009 is: Section Widget by Godfrey Chan! Elegant Themes [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>There are a few good news and WordPress articles that were published today. The first and most important is <strong>the result of the WordPress plugin competition</strong>:</p>
<ul>
<li>
<div><a href="http://weblogtoolscollection.com/archives/2009/09/28/wordpress-plugin-competition-2009-winner/">WordPress Plugin Competition 2009 Winner! « Weblog Tools Collection</a></div>
<div>The winner of the Grand Prize of the WordPress Plugin Competition 2009 is:<br />
Section Widget by Godfrey Chan!</div>
</li>
</ul>
<p><a title="Elegant Themes" href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=368_0_1_3" target="_blank">Elegant Themes</a> also updated a part of its themes, with <strong>a new options panel</strong>, giving the occasion to 2 lucky Wprecipes readers to win club memberships:</p>
<ul>
<li>
<div><a href="http://www.elegantthemes.com/blog/theme-changesbug-fixes/epanel-released-batch-1/">ePanel Released: Batch 1- Elegant Themes Blog</a></div>
<div>The now well known <a title="Elegant Themes" href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=368_0_1_3" target="_blank">Elegant themes</a> releases a new option panel for a part of its themes: ePanel (that&#8217;s its name) has been integrated into the following themes: eNews, Bold, ePhoto, eBusiness, CherryTruffle and PureType. The panel itself is probably the most advances theme options panel I have seen for a WordPress theme: the design, the SEO options, the ad settings, &#8230; You can do everything from that panel!</div>
</li>
</ul>
<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.wprecipes.com/wprecipes-elegantthemes-contest-win-premium-wp-themes">WpRecipes &amp; ElegantThemes contest: Win Premium WP Themes!</a></div>
<div class="delicious-extended">Nick of <a title="Elegant Themes WordPress theme club" href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=368_0_1_3" target="_blank">ElegantThemes.com</a> just released a killer option page for all his themes. To celebrate this great achievement, Nick decided to offer an ElegantThemes subscription to two of WPrecipes readers.</div>
</li>
</ul>
<p><strong>Two great tutorials</strong> were also published today:</p>
<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://wpengineer.com/filter-duplicate-posts-in-the-loop/">Filter Duplicate Posts in the Loop &#8211; Loop No1 , Loop, This, Therefore, WordPress &#8211; WP Engineer</a></div>
<div class="delicious-extended">How to make sure that the content presented, which is output in a loop, does not show up again in a second loop.</div>
</li>
<li>
<div class="delicious-link"><a href="http://digwp.com/2009/09/easy-shortcode-permalinks/">Easy Shortcode Permalinks | Digging into WordPress</a></div>
<div class="delicious-extended">When you are building a theme, and the circumstance comes up where you need to create a link to a specific page hard-baked right into the theme, there is a function you should be using.</div>
</li>
</ul>
<p>And I wanted to present you with <strong>a new WordPress cache plugin</strong>:</p>
<ul>
<li>
<div><a href="http://wordpress.org/extend/plugins/w3-total-cache/">WordPress › W3 Total Cache « WordPress Plugins</a></div>
<div>After Wp Super Cache, another great cache plugin:<br />
W3 Total Cache improves the user experience of your blog by caching every aspect of your site, reducing the download time of your theme and providing transparent content delivery network (CDN) integration.</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/links/links-for-2009-09-29/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

