<?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>Falise.com &#187; Blog</title>
	<atom:link href="http://www.falise.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.falise.com</link>
	<description>Falise.com, een klein webbureau uit Utrecht. Gespecialiseerd in Wordpress, CakePhp, Flash, jQuery, XHTML, CSS, PHP</description>
	<lastBuildDate>Wed, 16 May 2012 13:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Prevent click event when scrolling on iPad</title>
		<link>http://www.falise.com/blog/prevent-click-event-scrolling-ipad/</link>
		<comments>http://www.falise.com/blog/prevent-click-event-scrolling-ipad/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 12:11:32 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=382</guid>
		<description><![CDATA[<p>Here&#8217;s a few lines of simple javascript code to prevent click event inside of scrolling elements on an iOs device: var iOs = agent.indexOf('iphone') &#62;= 0 &#124;&#124; agent.indexOf('ipad') &#62;= 0; var clickEvent = iOs ? 'touchend' : 'click'; var touchMoving ...</p><p><a href="http://www.falise.com/blog/prevent-click-event-scrolling-ipad/">Prevent click event when scrolling on iPad</a></p>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a few lines of simple javascript code to prevent click event inside of scrolling elements on an iOs device:</p>
<pre>var iOs = agent.indexOf('iphone') &gt;= 0 || agent.indexOf('<a title="ipad" target="_blank" href="/tag/ipad">ipad</a>') &gt;= 0;
var clickEvent = iOs ? 'touchend' : 'click';
var touchMoving = false;
if (iOs)
{
  document.ontouchmove = function(e)
  {
     touchMoving = true;
  }

  document.ontouchend = function(e)
  {
    touchMoving = false;
  }
} 

$(document).bind('ready', function()
{
  $('#somelink').bind(clickEvent, function()
  {
    if (touchMoving) return false;
    // your code here
  });
}</pre>
<p><a href="http://www.falise.com/blog/prevent-click-event-scrolling-ipad/">Prevent click event when scrolling on iPad</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/prevent-click-event-scrolling-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t find your way home?</title>
		<link>http://www.falise.com/blog/wordpress-code/menu-home/</link>
		<comments>http://www.falise.com/blog/wordpress-code/menu-home/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 11:55:07 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress code]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=349</guid>
		<description><![CDATA[<p>Home is where your website starts but by default, Home doesn&#8217;t show up in your WordPress menu. Add this bit of code to your functions.php and it will magically appear: function home_page_menu_args( $args ) { $args['show_home'] = true; return $args; ...</p><p><a href="http://www.falise.com/blog/wordpress-code/menu-home/">Can&#8217;t find your way home?</a></p>]]></description>
			<content:encoded><![CDATA[<p>Home is where your website starts but by default, Home doesn&#8217;t show up in your <a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a> menu. Add this bit of code to your functions.php and it will magically appear:</p>
<pre>
function home_page_menu_args( $args )
{
  $args['show_home'] = true;
  return $args;
}
add_filter( 'wp_page_menu_args', 'home_page_menu_args' );
</pre>
<p><a href="http://www.falise.com/blog/wordpress-code/menu-home/">Can&#8217;t find your way home?</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/menu-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: Tweet</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/tweet/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/tweet/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 07:00:04 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=316</guid>
		<description><![CDATA[<p>The Tweet plugin does two things; it rewrite Twitter usernames starting with @ and hashtags starting with # so that they automatically link to either the Twitter userpage or the Twitter searchpage. Very usefull for any modern blogger, but especially ...</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/tweet/">WordPress plugin of the day: Tweet</a></p>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wordpress.org/extend/plugins/tweet/" target="_blank">Tweet plugin</a> does two things; it rewrite Twitter usernames starting with <a href="http://twitter.com/" class="tweet-username">@</a> and hashtags starting with <a href="http://search.twitter.com/search?q=%23" class="tweet-hashtag">#</a> so that they automatically link to either the Twitter userpage or the Twitter searchpage. Very usefull for any modern blogger, but especially if you import your top tweets from your Twitter account into your blog &#8230; Judging by the &#8216;empty&#8217; links above; it works a bit too well!</p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/tweet/">WordPress plugin of the day: Tweet</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/tweet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: Admin Menu Editor</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/admin-menu-editor/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/admin-menu-editor/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 07:00:44 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=314</guid>
		<description><![CDATA[<p>Yesterdays plugin worked almost perfectly, but our editor was still seeing a few menu items he wasn&#8217;t supposed to. We used the Admin Menu Editor to change permissions needed for those menu items, thus making them disappear from the menu. ...</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/admin-menu-editor/">WordPress plugin of the day: Admin Menu Editor</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/capability-manager/">Yesterdays plugin</a> worked almost perfectly, but our editor was still seeing a few menu items he wasn&#8217;t supposed to. We used the <a href="http://wordpress.org/extend/plugins/admin-menu-editor/" target="_blank">Admin Menu Editor</a> to change permissions needed for those menu items, thus making them disappear from the menu. </p>
<p>It&#8217;s typical for plugins to have their options under the Options or Extra menu items, but with a too low capabilities. We changed the <em>edit_pages</em> capability to <em>manage_options</em> so that only administrators could see them. The <a href="http://wordpress.org/extend/plugins/admin-menu-editor/" target="_blank">Admin Menu Editor</a> plugin is also very handy for rearranging menu items and for renaming them.</p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/admin-menu-editor/">WordPress plugin of the day: Admin Menu Editor</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/admin-menu-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Syndication and the_content filter</title>
		<link>http://www.falise.com/blog/wordpress-code/wordpress-syndication-thecontent-filter/</link>
		<comments>http://www.falise.com/blog/wordpress-code/wordpress-syndication-thecontent-filter/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 20:08:02 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Wordpress code]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=318</guid>
		<description><![CDATA[<p>We use the FeedWordPress plugin to import Twitter updates into our blog, select the most interesting ones and put them on the homepage. However, the Tweet plugin wasn&#8217;t working. After a bit of testing we concluded that the_content filters were ...</p><p><a href="http://www.falise.com/blog/wordpress-code/wordpress-syndication-thecontent-filter/">WordPress Syndication and the_content filter</a></p>]]></description>
			<content:encoded><![CDATA[<p>We use the <a href="http://wordpress.org/extend/plugins/feedwordpress/" target="_blank">FeedWordPress</a> plugin to import Twitter updates into our blog, select the most interesting ones and put them on the homepage. However, the <a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/tweet/" target="_blank">Tweet plugin</a> wasn&#8217;t working. After a bit of testing we concluded that the_content filters were being run but totally ignored! As it turns out (after a lot of code digging) The <a href="http://wordpress.org/extend/plugins/feedwordpress/" target="_blank">FeedWordPress</a> plugin actually rewrites the content of it&#8217;s imported posts to their original values thus bypassing any the_content filters. Add the following lines of code to your functions.php to prevent this:</p>
<pre>
remove_filter('the_content', 'feedwordpress_preserve_syndicated_content', -10000);
remove_filter('the_content', 'feedwordpress_restore_syndicated_content', 10000);
</pre>
<p><a href="http://www.falise.com/blog/wordpress-code/wordpress-syndication-thecontent-filter/">WordPress Syndication and the_content filter</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/wordpress-syndication-thecontent-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: Capability Manager</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/capability-manager/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/capability-manager/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 17:45:28 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=312</guid>
		<description><![CDATA[<p>The great plugin Capability Manager allows you to change the default WordPress roles and create a few new ones as you see fit. We used it recently to allow an editor to create and modify users and remove the unused ...</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/capability-manager/">WordPress plugin of the day: Capability Manager</a></p>]]></description>
			<content:encoded><![CDATA[<p>The great plugin <a href="http://wordpress.org/extend/plugins/capsman/" target="_blank">Capability Manager</a> allows you to change the default <a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a> roles and create a few new ones as you see fit. We used it recently to allow an editor to create and modify users and remove the unused links section in the backend by removing the links capabilities.</p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/capability-manager/">WordPress plugin of the day: Capability Manager</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/capability-manager/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Format any date according to WordPress date formatting settings</title>
		<link>http://www.falise.com/blog/wordpress-code/format-date-wordpress-date-formatting-settings/</link>
		<comments>http://www.falise.com/blog/wordpress-code/format-date-wordpress-date-formatting-settings/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 15:57:12 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress code]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=309</guid>
		<description><![CDATA[<p>Format any date you like according to the date formatting settings in the WordPress backend with this simple piece of code. Put the following function in your theme&#8217;s functions.php file and enjoy the magic anywhere in your theme. // $date ...</p><p><a href="http://www.falise.com/blog/wordpress-code/format-date-wordpress-date-formatting-settings/">Format any date according to WordPress date formatting settings</a></p>]]></description>
			<content:encoded><![CDATA[<p>Format any date you like according to the date formatting settings in the <a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a> backend with this simple piece of code. Put the following function in your theme&#8217;s functions.php file and enjoy the magic anywhere in your theme.</p>
<pre>
// $date is in yyyy-mm-dd format
function any_date($date = '2011-10-28')
{
  $format = get_option('date_format');
  return apply_filters('get_the_time', mysql2date($format, $date), $format);
}
</pre>
<p><a href="http://www.falise.com/blog/wordpress-code/format-date-wordpress-date-formatting-settings/">Format any date according to WordPress date formatting settings</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/format-date-wordpress-date-formatting-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: Advanced Excerpt</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-advanced-excerpt/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-advanced-excerpt/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 12:30:39 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=307</guid>
		<description><![CDATA[<p>WordPress&#8217; post excerpt is by default nothing more than a shortened plain text version of your posts content and sometimes that can be too limiting. Enter Advanced Excerpt to give you full control over the excerpt; allow certain HTML tags, ...</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-advanced-excerpt/">WordPress plugin of the day: Advanced Excerpt</a></p>]]></description>
			<content:encoded><![CDATA[<p><a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a>&#8217; post excerpt is by default nothing more than a shortened plain text version of your posts content and sometimes that can be too limiting. Enter <a href="http://wordpress.org/extend/plugins/advanced-excerpt/" target="_blank">Advanced Excerpt</a> to give you full control over the excerpt; allow certain HTML tags, adjust the length by word or character count, add your own read-more text, etc.</p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-advanced-excerpt/">WordPress plugin of the day: Advanced Excerpt</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-advanced-excerpt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hierarchical WordPress templates</title>
		<link>http://www.falise.com/blog/wordpress-code/hierarchical-wordpress-templates/</link>
		<comments>http://www.falise.com/blog/wordpress-code/hierarchical-wordpress-templates/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 11:36:57 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress code]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=304</guid>
		<description><![CDATA[<p>Another useful piece of code for you to put into your functions.php file. You probably already know that a file in your theme dir called category-1.php will be used for showing content for the category that has an id of ...</p><p><a href="http://www.falise.com/blog/wordpress-code/hierarchical-wordpress-templates/">Hierarchical WordPress templates</a></p>]]></description>
			<content:encoded><![CDATA[<p>Another useful piece of code for you to put into your functions.php file. You probably already know that a file in your theme dir called category-1.php will be used for showing content for the category that has an id of 1. The filters below allow you to have hierarchical templates based on category id. For instance, all single posts belonging to category 1 will use single-cat-1.php. Also, all <em>child</em> categories of category 1 will use category-1.php.</p>
<p><span id="more-304"></span></p>
<pre>
// search for a template for the current post
// template is based on the current category id
// if no category template is found, keep searching parent categories
// filename structure: single-cat-0.php where 0 is the number of the category id 

function mytheme_single_template($template)
{
  foreach( (array) get_the_category() as $cat )
  {
    // get template for current category
    $file = TEMPLATEPATH . '/single-cat-' . $cat->term_id . '.php';
    if (file_exists($file)) return $file;

    // search ancestor categories
    while ($cat->category_parent != 0)
    {
      $cat = get_category($cat->category_parent);
      $file = TEMPLATEPATH . '/single-cat-' . $cat->term_id . '.php';
      if (file_exists($file)) return $file;
    }
  }

  // return original template
  return $template;
}
add_filter('single_template', 'mytheme_single_template');

// search for a template for the current category
// template is based on the current category id
// if no category template is found, keep searching parent categories
// filename structure: category-0.php where 0 is the number of the category id 

function mytheme_category_template($template)
{
  $cat_id = get_query_var('cat');
  $cat = get_category($cat_id);

  $file = TEMPLATEPATH . '/category-' . $cat->term_id . '.php';
  if (file_exists($file)) return $file;

  while ($cat->category_parent != 0)
  {
    $cat = get_category($cat->category_parent);
    $file = TEMPLATEPATH . '/category-' . $cat->term_id . '.php';
    if (file_exists($file)) return $file;
  }

  return $template;
}
add_filter('category_template', 'mytheme_category_template');
</pre>
<p><a href="http://www.falise.com/blog/wordpress-code/hierarchical-wordpress-templates/">Hierarchical WordPress templates</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/hierarchical-wordpress-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: p2pConverter</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/p2pconverter/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/p2pconverter/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 09:00:22 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=293</guid>
		<description><![CDATA[<p>Created a few dozen pages that in hindsight should have been posts? It even happens to the best (that&#8217;s us) and fortunately there&#8217;s a handy WordPress plugin out there that can fix this for you: p2pConverter.</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/p2pconverter/">WordPress plugin of the day: p2pConverter</a></p>]]></description>
			<content:encoded><![CDATA[<p>Created a few dozen pages that in hindsight should have been posts? It even happens to the best (that&#8217;s us) and fortunately there&#8217;s a handy <a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a> plugin out there that can fix this for you: <a href="http://wordpress.org/extend/plugins/p2pconverter/" target="_blank">p2pConverter</a>.</p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/p2pconverter/">WordPress plugin of the day: p2pConverter</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/p2pconverter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AddThis sharing + Google Analytics event tracking</title>
		<link>http://www.falise.com/blog/addthis-sharing-google-analytics-event-tracking/</link>
		<comments>http://www.falise.com/blog/addthis-sharing-google-analytics-event-tracking/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 19:00:03 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Home]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=278</guid>
		<description><![CDATA[<p>We love AddThis. By adding a tiny bit of code to a website, visitors can easily share what they like with the rest of the world. AddThis also tracks what gets shared. All of our websites have Google Analytics embedded, ...</p><p><a href="http://www.falise.com/blog/addthis-sharing-google-analytics-event-tracking/">AddThis sharing + Google Analytics event tracking</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.addthis.com/help/google-analytics-integration#.ToTcoqjdPIU" target="_blank"><img class="alignleft size-full wp-image-279" title="" src="http://static.falise.com/uploads/2011/09/addthis.png" alt="" width="108" height="109" /></a>We love AddThis. By adding a tiny bit of code to a website, visitors can easily share what they like with the rest of the world. AddThis also tracks what gets shared. All of our websites have Google Analytics embedded, so wouldn&#8217;t it be great if AddThis sharing statistics would appear in Google Analytics? That only requires three lines of code! How? Read it in the <a href="http://www.addthis.com/help/google-analytics-integration#.ToTcoqjdPIU" target="_blank">AddThis Help section</a>.</p>
<p><a href="http://www.falise.com/blog/addthis-sharing-google-analytics-event-tracking/">AddThis sharing + Google Analytics event tracking</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/addthis-sharing-google-analytics-event-tracking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yourls &#8211; Your Own Url Shortener</title>
		<link>http://www.falise.com/blog/yourls/</link>
		<comments>http://www.falise.com/blog/yourls/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 10:34:25 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[short url]]></category>
		<category><![CDATA[yourls]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=269</guid>
		<description><![CDATA[<p>Never knew creating Your Own Url Shortener (Yourls) could be that easy, just follow the steps in this simple tutorial and you&#8217;ll be up and running in no time! See, we&#8217;re using it already!</p><p><a href="http://www.falise.com/blog/yourls/">Yourls &#8211; Your Own Url Shortener</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://fali.se/howtoyourls" target="_blank"><img class="alignleft size-full wp-image-271" title="yourls-logo-200x89" src="http://static.falise.com/uploads/2011/09/yourls-logo-200x89.png" alt="" width="200" height="89" /></a>Never knew creating Your Own Url Shortener (<a href="http://fali.se/yourls" target="_blank">Yourls</a>) could be that easy, just follow the steps in <a href="http://fali.se/howtoyourls" target="_blank">this simple tutorial</a> and you&#8217;ll be up and running in no time! See, we&#8217;re using it already!</p>
<p><a href="http://www.falise.com/blog/yourls/">Yourls &#8211; Your Own Url Shortener</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/yourls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: Regenerate Thumbnails</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/regenerate-thumbnails/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/regenerate-thumbnails/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 09:35:54 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=266</guid>
		<description><![CDATA[<p>During the development of a website you might need to change the sizes of your thumbnails to match designs change, unfortunately your thumbnails won&#8217;t automatically resize and that&#8217;s when this plugin comes in handy. With one click of a button ...</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/regenerate-thumbnails/">WordPress plugin of the day: Regenerate Thumbnails</a></p>]]></description>
			<content:encoded><![CDATA[<p>During the development of a website you might need to change the sizes of your thumbnails to match designs change, unfortunately your thumbnails won&#8217;t automatically resize and that&#8217;s when this plugin comes in handy. With one click of a button (and a cup of coffee later) your thumbnails will be &#8230; <a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/" target="_blank">regenerated</a>.</p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/regenerate-thumbnails/">WordPress plugin of the day: Regenerate Thumbnails</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/regenerate-thumbnails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin of the day: Resize at Upload Plus</title>
		<link>http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-resize-upload/</link>
		<comments>http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-resize-upload/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 16:23:35 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Wordpress plugin of the day]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=263</guid>
		<description><![CDATA[<p>This plugin does exactly what it says: it will resize images at upload. Works great when uploaders have a tendency to upload multimegapixel images directly from their camera We prefer a maximum size of 1280 pixels. Download it here; wordpress.org/extend/plugins/resize-at-upload-plus/</p><p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-resize-upload/">WordPress plugin of the day: Resize at Upload Plus</a></p>]]></description>
			<content:encoded><![CDATA[<p>This plugin does exactly what it says: it will resize images at upload. Works great when uploaders have a tendency to upload multimegapixel images directly from their camera <img src='http://www.falise.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  We prefer a maximum size of 1280 pixels.</p>
<p>Download it here; <a href="http://wordpress.org/extend/plugins/resize-at-upload-plus/" target="_blank">wordpress.org/extend/plugins/resize-at-upload-plus/</a></p>
<p><a href="http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-resize-upload/">WordPress plugin of the day: Resize at Upload Plus</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-plugin-of-the-day/wordpress-plugin-day-resize-upload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting good grades with YSlow &#8211; Part 1: Combining javascript and CSS files</title>
		<link>http://www.falise.com/blog/wordpress-code/good-yslow-grades-javascript-css/</link>
		<comments>http://www.falise.com/blog/wordpress-code/good-yslow-grades-javascript-css/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 12:37:51 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Wordpress code]]></category>
		<category><![CDATA[combine]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yslow]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=240</guid>
		<description><![CDATA[<p>Having a website that loads as fast as possible isn&#8217;t just good news for your visitors, it can also improve your page ranking on search engines. YSlow is a tool from Yahoo that let&#8217;s you measure just how fast your ...</p><p><a href="http://www.falise.com/blog/wordpress-code/good-yslow-grades-javascript-css/">Getting good grades with YSlow &#8211; Part 1: Combining javascript and CSS files</a></p>]]></description>
			<content:encoded><![CDATA[<p>Having a website that loads as fast as possible isn&#8217;t just good news for your visitors, it can also improve your page ranking on search engines. <a href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a> is a tool from Yahoo that let&#8217;s you measure just how fast your website is loading and what might be causing delays. Once installed and activated you can begin measuring your page loading speed. How well is your website performing? Ours was a C (scoring 72) before the optimizations suggested below, it&#8217;s an A (scoring 92) now. Read on for some <a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a> specific tips on how you can optimize your website.</p>
<p><span id="more-240"></span></p>
<p>Loading multiple small files is slower than loading one big file; each connection takes time to set up so lets minimize the number of connections your website makes. Ideally you only need two connections; one for all your javascript files and one for all your CSS files. There are a variety of plugins available to do this but since we like to code we have devised own method. Simply put, we create a php file that includes the files we need. On top of that it also applies gzip compression (making the file a lot smaller) and adds expiration headers (so your browser can cache the files and only needs to load them once). Get ready for some code!</p>
<p>We&#8217;re assuming you put all your CSS files in a directory named <em>css</em> and put all your javascripts files in a directory named <em>js</em>, these directories reside in your theme directory. In both directories we created files named index.php, this saves a few bytes when include the files in the head of our html document.</p>
<h2>Creating css/index.php</h2>
<p>Create a file named index.php in your css directory and fill it with the code below:</p>
<pre>&lt;?php
  ob_start ("ob_gzhandler"); // gzip compression
  header("Content-type: text/css; charset: UTF-8"); // mime-type
  header("Cache-Control: must-revalidate");
  header("Expires: " . gmdate("D, d M Y H:i:s", time() + 604800) . " GMT"); // near future expires header

  $dir = ''; // root dir for your css files

  // array of css files and their media type
  $css = array(
    'all' =&gt; array(
      'reset.css'
    ),
    'handheld' =&gt; array(
      'handheld.css'
    ),
    'screen' =&gt; array(
      'screen.css'
    )
  );

  // include all css files and wrap them in <a href="http://twitter.com/media" class="tweet-username">@media</a>
  foreach($css as $media =&gt; $urls)
  {
    echo "<a href="http://twitter.com/media" class="tweet-username">@media</a> $media {\n\n";
    foreach($urls as $url)
    {
      if (!empty($url)) include($dir . $url);
    }
    echo "}\n\n";
  }
?&gt;</pre>
<p>Find all references to css files in your theme and add the css file names to the $css array. Each media type has it&#8217;s own key, so put them in the right place! When your done, delete all the old css references in your theme and replace them with the following line of code:</p>
<pre>&lt;link rel="stylesheet" type="text/css" href="<!--?php echo get_bloginfo('theme_dir'); ?-->/css/" /&gt;</pre>
<h2>Creating js/index.php</h2>
<p>Lets do the same for javascript files, create a file named index.php in your js directory and fill it with the code below:</p>
<pre>&lt;?php
  ob_start("ob_gzhandler"); // gzip compression
  header("content-type: application/x-javascript"); // mime-type
  header("Cache-Control: must-revalidate");
  header("Expires: " . gmdate("D, d M Y H:i:s", time() + 604800) . " GMT"); // near future expires header

  $dir = ''; // root dir for your js files

  // array of scripts files
  $scripts = array(
    '<a title="jquery" target="_blank" href="/tag/jquery">jquery</a>-1.6.2.min.js',
    'script.js'
  );

  foreach($scripts as $script)
  {
    include($script);
  }
?&gt;</pre>
<p>Find all references to javascript files in your theme and add the file names to the $scripts array. When your done, delete all the old javascript references in your theme and replace them with the following line of code:</p>
<pre>&lt;script src="<!--?php echo get_bloginfo('theme_dir'); ?-->/js/" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;</pre>
<p>All done! Now check your website again in YSlow and see the differences. Our CSS file was 21KB without compression and 5.8KB with compression. Our javascript file went from 126KB to 42.5KB. Did you notice you don&#8217;t actually need to have &#8216;index.php&#8217; in your script or link tags? Saves a few bytes as well!</p>
<p><a href="http://www.falise.com/blog/wordpress-code/good-yslow-grades-javascript-css/">Getting good grades with YSlow &#8211; Part 1: Combining javascript and CSS files</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/good-yslow-grades-javascript-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple permalinks for a single post with multiple categories in WordPress</title>
		<link>http://www.falise.com/blog/wordpress-code/multiple-permalinks-for-a-single-post-with-multiple-categories-in-wordpress/</link>
		<comments>http://www.falise.com/blog/wordpress-code/multiple-permalinks-for-a-single-post-with-multiple-categories-in-wordpress/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 14:00:18 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Wordpress code]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=219</guid>
		<description><![CDATA[<p>Ever had more than one category assigned to a post? Did you get stuck with a single permalink where you might have wanted a dynamic permalink based on the current category? Read on and find out how to &#8216;hack&#8217; your ...</p><p><a href="http://www.falise.com/blog/wordpress-code/multiple-permalinks-for-a-single-post-with-multiple-categories-in-wordpress/">Multiple permalinks for a single post with multiple categories in WordPress</a></p>]]></description>
			<content:encoded><![CDATA[<p>Ever had more than one category assigned to a post? Did you get stuck with a single permalink where you might have wanted a dynamic permalink based on the current category? Read on and find out how to &#8216;hack&#8217; your <a title="WordPress" target="_blank" href="/tag/wordpress">WordPress</a> theme to make this happen.</p>
<p><span id="more-219"></span></p>
<p>First of all, change your permalink structure to <strong>/%category%/%postname%/ </strong>Also, may I suggest you install the <a href="http://wordpress.org/extend/plugins/wp-no-category-base/" target="_blank">WP No Category Base</a> plugin? This makes your permalinks very pretty and very readable like so: <a href="http://www.yourwebsite.com/parent-category-name/child-category-name/post-name" class="autohyperlink" title="http://www.yourwebsite.com/parent-category-name/child-category-name/post-name" target="_blank" rel="nofollow">www.yourwebsite.com/parent-category-name/child-category-name/post-name</a>.</p>
<p>Guess what? The last part of the URL is the slug of your post name, the part before the slash is the slug of the current category! We&#8217;re going to use this to write our own permalinks. Trust me .. they&#8217;ll work even if <a title="WordPress" target="_blank" href="/tag/wordpress">WordPress</a> suggest otherwise. You can try this right now if you want to. Go to your website (after installing the plug-in and changing your permalink structure of-course) and type <a href="http://www.yourwebsite.com/that-other-category-you-assigned-to-your-post/the-slug-of-your-post" class="autohyperlink" title="http://www.yourwebsite.com/that-other-category-you-assigned-to-your-post/the-slug-of-your-post" target="_blank" rel="nofollow">www.yourwebsite.com/that-other-category-you-assigned-to-your-post/the-slug-of-your-post</a> into the address bar. Does it work?</p>
<p>Now on the coding part. I assume you are familiar with coding in PHP and now where your functions.php file is? It&#8217;s in the folder of your current theme. Go and and open it. We need to add the following lines of code to this file:</p>
<pre>
function multiple_category_post_link($url = '')
{
  // check permalink structure for the required construct; /%category%/%postname%/
  if (strrpos(get_option('permalink_structure'), '%category%/%postname%') !== false)
  {
    // get the current post
    global $post, $wp_query;

    // prepare variables for use below
    $post_id = $cat_id = 0;
    $new_url = '';

    // for categories
    if (is_category())
    {
      // remember current category and post
      $cat_id = get_query_var('cat');
      $post_id = $post->ID;

      // add the post slug to the current url
      $new_url = $_SERVER['REQUEST_URI'] . $post->post_name;
    }

    // for single posts
    else if (is_single())
    {
      // last part in the 'category_name' should be the slug for the current category
      $cat_slug = array_pop(explode('/', get_query_var('category_name')));
      $cat = get_category_by_slug($cat_slug);

      // remember current category and post
      $post_id = $wp_query->post->ID;
      if ($cat) $cat_id = $cat->cat_ID;

      // replace the slug of the post being viewed by the slug of $post
      $new_url = str_replace('/' . get_query_var('name'), '', $_SERVER['REQUEST_URI']) . $post->post_name;
    } 

    if ($post_id > 0 &#038;&#038; $cat_id > 0 &#038;&#038; !empty($new_url))
    {
      // make sure categories match!
      foreach(get_the_category($post_id) as $cat)
      {
        if ($cat->cat_ID == $cat_id)
        {
          $url = $new_url;
          break;
        }
      }
    }
  }   

  // always return an url!
  return $url;
}
add_filter('post_link', 'multiple_category_post_link');
</pre>
<p>Save and upload your new functions.php file to your webserver and check out the changes on your website. You can also download the text file with all the code; <a href="http://www.falise.com/blog/blog-wordpress/multiple-permalinks-for-a-single-post-with-multiple-categories-in-wordpress/attachment/multiple_category_post_link/" rel="attachment wp-att-225">multiple_category_post_link.txt</a>. Let us know if it worked in the comments below.</p>
<p><a href="http://www.falise.com/blog/wordpress-code/multiple-permalinks-for-a-single-post-with-multiple-categories-in-wordpress/">Multiple permalinks for a single post with multiple categories in WordPress</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/multiple-permalinks-for-a-single-post-with-multiple-categories-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress thumbnail quality</title>
		<link>http://www.falise.com/blog/wordpress-code/wordpress-thumbnail-quality/</link>
		<comments>http://www.falise.com/blog/wordpress-code/wordpress-thumbnail-quality/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 13:11:06 +0000</pubDate>
		<dc:creator>Sander</dc:creator>
				<category><![CDATA[Wordpress code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.falise.com/?p=164</guid>
		<description><![CDATA[<p>While searching for a way to change the default jpeg quality of generated thumbnails in WordPress, I came along this simple piece of code: function jpeg_quality_filter($quality) { return 100; } add_filter('jpeg_quality', 'jpeg_quality_filter'); Add to the functions.php file in your theme ...</p><p><a href="http://www.falise.com/blog/wordpress-code/wordpress-thumbnail-quality/">WordPress thumbnail quality</a></p>]]></description>
			<content:encoded><![CDATA[<p>While searching for a way to change the default jpeg quality of generated thumbnails in <a title="Wordpress" target="_blank" href="/tag/wordpress">WordPress</a>, I came along this simple piece of code:</p>
<pre>function jpeg_quality_filter($quality) { return 100; }
add_filter('jpeg_quality', 'jpeg_quality_filter');</pre>
<p>Add to the functions.php file in your theme directory and change &#8217;100&#8242; to the desired jpeg compression value (higher is better).</p>
<p><a href="http://www.falise.com/blog/wordpress-code/wordpress-thumbnail-quality/">WordPress thumbnail quality</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.falise.com/blog/wordpress-code/wordpress-thumbnail-quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

