<?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>Jason Ellis</title>
	<atom:link href="http://jasonellis.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonellis.ca</link>
	<description>Freelance Web Developer in Barrie, Ontario</description>
	<lastBuildDate>Mon, 17 Jun 2013 03:02:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to centre absolutely positioned elements on screen</title>
		<link>http://jasonellis.ca/code-snippets/how-to-centre-absolutely-positioned-elements-on-screen/</link>
		<comments>http://jasonellis.ca/code-snippets/how-to-centre-absolutely-positioned-elements-on-screen/#comments</comments>
		<pubDate>Mon, 17 Jun 2013 03:01:11 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[CSS Tricks]]></category>
		<category><![CDATA[How-to]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=685</guid>
		<description><![CDATA[<p>If you want to place absolutely positioned elements in the middle of the screen just do the following: #some_div{ width: 150px; height: 100px; position: absolute; top: 50%; left: 50%; margin-top: -50px;/* half of the height */ margin-left: -75px;/* half of the width */ } That&#8217;s it!</p><p>The post <a href="http://jasonellis.ca/code-snippets/how-to-centre-absolutely-positioned-elements-on-screen/">How to centre absolutely positioned elements on screen</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>If you want to place absolutely positioned elements in the middle of the screen just do the following:</p>
<pre>
#some_div{
    width: 150px;
    height: 100px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -50px;/* half of the height */
    margin-left: -75px;/* half of the width */
}
</pre>
<p>That&#8217;s it!</p>
<p>The post <a href="http://jasonellis.ca/code-snippets/how-to-centre-absolutely-positioned-elements-on-screen/">How to centre absolutely positioned elements on screen</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/code-snippets/how-to-centre-absolutely-positioned-elements-on-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add even and odd classes to posts</title>
		<link>http://jasonellis.ca/how-to/how-to-add-even-and-odd-classes-to-posts/</link>
		<comments>http://jasonellis.ca/how-to/how-to-add-even-and-odd-classes-to-posts/#comments</comments>
		<pubDate>Mon, 10 Jun 2013 15:39:59 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=682</guid>
		<description><![CDATA[<p>Just paste this code within the class attribute of your element and voila! &#60;?php echo (++$j % 2 == 0) ? 'even' : 'odd'; ?&#62;</p><p>The post <a href="http://jasonellis.ca/how-to/how-to-add-even-and-odd-classes-to-posts/">How to add even and odd classes to posts</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Just paste this code within the class attribute of your element and voila!</p>
<pre>&lt;?php echo (++$j % 2 == 0) ? 'even' : 'odd'; ?&gt;</pre>
<p>The post <a href="http://jasonellis.ca/how-to/how-to-add-even-and-odd-classes-to-posts/">How to add even and odd classes to posts</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/how-to/how-to-add-even-and-odd-classes-to-posts/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
		<item>
		<title>Super Easy Way to Display an RSS Feed with PHP</title>
		<link>http://jasonellis.ca/php/super-easy-way-to-display-an-rss-feed-with-php/</link>
		<comments>http://jasonellis.ca/php/super-easy-way-to-display-an-rss-feed-with-php/#comments</comments>
		<pubDate>Fri, 07 Jun 2013 14:55:15 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=678</guid>
		<description><![CDATA[<p>Easy as pie: http://bavotasan.com/2010/display-rss-feed-with-php/</p><p>The post <a href="http://jasonellis.ca/php/super-easy-way-to-display-an-rss-feed-with-php/">Super Easy Way to Display an RSS Feed with PHP</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Easy as pie: <a href="http://bavotasan.com/2010/display-rss-feed-with-php/" title="Super Easy Way to Display an RSS Feed with PHP" target="_blank">http://bavotasan.com/2010/display-rss-feed-with-php/</a></p>
<p>The post <a href="http://jasonellis.ca/php/super-easy-way-to-display-an-rss-feed-with-php/">Super Easy Way to Display an RSS Feed with PHP</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/php/super-easy-way-to-display-an-rss-feed-with-php/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>nth-child Fix for IE 8 and lower</title>
		<link>http://jasonellis.ca/code-snippets/nth-child-fix-for-ie-8-and-lower/</link>
		<comments>http://jasonellis.ca/code-snippets/nth-child-fix-for-ie-8-and-lower/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 17:22:28 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=675</guid>
		<description><![CDATA[<p>&#60;script src="http://code.jquery.com/jquery-1.9.1.min.js"&#62;&#60;/script&#62; &#60;!--[if lte IE 8]&#62; &#60;script type="text/javascript"&#62; $(document).ready(function() { $('div.product:nth-child(3n)').css('margin-right', '0'); }); &#60;/script&#62; &#60;![endif]--&#62;</p><p>The post <a href="http://jasonellis.ca/code-snippets/nth-child-fix-for-ie-8-and-lower/">nth-child Fix for IE 8 and lower</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<pre>
&lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
    &lt;!--[if lte IE 8]&gt;
        &lt;script type="text/javascript"&gt;
            $(document).ready(function() {
                $('div.product:nth-child(3n)').css('margin-right', '0');
            });
        &lt;/script&gt;
    &lt;![endif]--&gt;
</pre>
<p>The post <a href="http://jasonellis.ca/code-snippets/nth-child-fix-for-ie-8-and-lower/">nth-child Fix for IE 8 and lower</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/code-snippets/nth-child-fix-for-ie-8-and-lower/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Reasons why every webmaster should use Google Webmasters Tools – Part 1</title>
		<link>http://jasonellis.ca/essential-tools/why-use-google-webmasters-tools-p1/</link>
		<comments>http://jasonellis.ca/essential-tools/why-use-google-webmasters-tools-p1/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 20:21:43 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[Essential Tools]]></category>
		<category><![CDATA[Just a Thought]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=622</guid>
		<description><![CDATA[<p>It has become common practice for web developers to install Google Analytics on their site to track traffic and visitor stats. However, another great tool that Google provides is Google Webmasters Tools and it is just as important, if not more, simply due to the comprehensive data it gathers. To begin with, once you submit [...]</p><p>The post <a href="http://jasonellis.ca/essential-tools/why-use-google-webmasters-tools-p1/">Reasons why every webmaster should use Google Webmasters Tools – Part 1</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>It has become common practice for web developers to install Google Analytics on their site to track traffic and visitor stats. However, another great tool that Google provides is Google Webmasters Tools and it is just as important, if not more, simply due to the comprehensive data it gathers. To begin with, once you submit your sitemap, you can see how many urls have been submitted vs. how many have been indexed (there are many reasons why not all url’s get indexed). You can also see all the Crawl errors, which are broken into 4 sections: server errors, soft 404, denied access and not found. From here you can view when each error was first detected, last crawled and even where the link is coming from. This is exceptionally useful when doing 301 redirects, especially when the errors are from an old/outdated source that you have no control over. Sites that have huge traffic and have been around for years end up having all sorts of links all over the web and without 301 redirects, a great deal of users would get the mostly unhelpful 404 page. By doing proper 301 redirects, you avoid loss of website traffic and user frustration.</p>
<p>The post <a href="http://jasonellis.ca/essential-tools/why-use-google-webmasters-tools-p1/">Reasons why every webmaster should use Google Webmasters Tools – Part 1</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/essential-tools/why-use-google-webmasters-tools-p1/feed/</wfw:commentRss>
		<slash:comments>382</slash:comments>
		</item>
		<item>
		<title>A Look At Responsive Web Design</title>
		<link>http://jasonellis.ca/just-a-thought/a-look-at-responsive-web-design/</link>
		<comments>http://jasonellis.ca/just-a-thought/a-look-at-responsive-web-design/#comments</comments>
		<pubDate>Sun, 10 Feb 2013 16:38:19 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[Just a Thought]]></category>
		<category><![CDATA[responsive web design]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=613</guid>
		<description><![CDATA[<p></p><p>The post <a href="http://jasonellis.ca/just-a-thought/a-look-at-responsive-web-design/">A Look At Responsive Web Design</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.dotcominfoway.com/blog/responsive-web-design-infographic"><img src="http://dotcominfoway.com/images/responsive-web-design-infographic.jpg" alt="Responsive Web Design Infographic" title="Responsive Web Design Infographic" width="555" height="1635" /></a> <br/><a href="http://www.dotcominfoway.com"Dot Com Infoway – Software and Mobile Application Development Company</a></p>
<p>The post <a href="http://jasonellis.ca/just-a-thought/a-look-at-responsive-web-design/">A Look At Responsive Web Design</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/just-a-thought/a-look-at-responsive-web-design/feed/</wfw:commentRss>
		<slash:comments>503</slash:comments>
		</item>
		<item>
		<title>Creating Custom Single Post Templates for Specific Category</title>
		<link>http://jasonellis.ca/wordpress-2/creating-custom-single-post-templates/</link>
		<comments>http://jasonellis.ca/wordpress-2/creating-custom-single-post-templates/#comments</comments>
		<pubDate>Thu, 10 Jan 2013 18:48:20 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=528</guid>
		<description><![CDATA[<p>In your single.php just replace this line: &#60;?php if (have_posts()) : ?&#62; With this one: &#60;?php if ( have_posts() ) { the_post(); rewind_posts(); } if ( in_category(59) ) { include(TEMPLATEPATH . '/singlepress.php'); } ?&#62; Just replace &#8220;singlepress.php&#8221; with your actual template filename and the category ID with the actual category ID</p><p>The post <a href="http://jasonellis.ca/wordpress-2/creating-custom-single-post-templates/">Creating Custom Single Post Templates for Specific Category</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In your single.php just replace this line:</p>
<pre>
&lt;?php if (have_posts()) : ?&gt;
</pre>
<p>With this one:</p>
<pre>
&lt;?php
    if ( have_posts() ) { the_post(); rewind_posts(); }
        if ( in_category(59) ) {
	    include(TEMPLATEPATH . '/singlepress.php');
        }
?&gt;
</pre>
<p>Just replace &#8220;singlepress.php&#8221; with your actual template filename and the category ID with the actual category ID</p>
<p>The post <a href="http://jasonellis.ca/wordpress-2/creating-custom-single-post-templates/">Creating Custom Single Post Templates for Specific Category</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/wordpress-2/creating-custom-single-post-templates/feed/</wfw:commentRss>
		<slash:comments>488</slash:comments>
		</item>
		<item>
		<title>How to Create Shorcodes with Atttibutes</title>
		<link>http://jasonellis.ca/wordpress-2/how-to-create-shorcodes-with-atttibutes/</link>
		<comments>http://jasonellis.ca/wordpress-2/how-to-create-shorcodes-with-atttibutes/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 11:44:33 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=516</guid>
		<description><![CDATA[<p>If you want to create a button shortcode then just paste this code in your themes functions.php file. // function button_func( $atts ) { extract( shortcode_atts( array( 'title' => 'Button', 'link' => '#', 'width' => '50', 'window' => 'self', ), $atts ) ); return "&#60;a style=\"width: {$width}px\" href=\"{$link}\" title=\"{$title}\" class=\"button\" target=\"_{$window}\"&#62;{$title}&#60;/a&#62;"; } add_shortcode( 'button', 'button_func' [...]</p><p>The post <a href="http://jasonellis.ca/wordpress-2/how-to-create-shorcodes-with-atttibutes/">How to Create Shorcodes with Atttibutes</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>If you want to create a button shortcode then just paste this code in your themes functions.php file.</p>
<pre>
//<a href="http://jasonellis.ca" class="avia-button " ><span class="avia-"></span></a>
function button_func( $atts ) {
	extract( shortcode_atts( array(
		'title' => 'Button',
		'link' => '#',
		'width' => '50',
		'window' => 'self',
	), $atts ) );
		
	return "&lt;a style=\"width: {$width}px\" href=\"{$link}\" title=\"{$title}\" class=\"button\" target=\"_{$window}\"&gt;{$title}&lt;/a&gt;";
	
}
add_shortcode( 'button', 'button_func' );
</pre>
<p>This will return a link called Visit Site that goes to the location specified. The width attribute (in pixels) gives the user control of the width of the button. The rest is pretty straightforward. You can add as many attributes as you need.</p>
<p>The post <a href="http://jasonellis.ca/wordpress-2/how-to-create-shorcodes-with-atttibutes/">How to Create Shorcodes with Atttibutes</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/wordpress-2/how-to-create-shorcodes-with-atttibutes/feed/</wfw:commentRss>
		<slash:comments>366</slash:comments>
		</item>
		<item>
		<title>Sticky footer with push div</title>
		<link>http://jasonellis.ca/code-snippets/sticky-footer-with-push-div/</link>
		<comments>http://jasonellis.ca/code-snippets/sticky-footer-with-push-div/#comments</comments>
		<pubDate>Sat, 24 Nov 2012 07:52:33 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=509</guid>
		<description><![CDATA[<p>The HTML &#60;html&#62; &#60;head&#62; &#60;/head&#62; &#60;body&#62; &#60;div id="wrapper"&#62; &#60;p&#62;Your content goes here.&#60;/p&#62; &#60;div class="push"&#62;&#60;/div&#62; &#60;/div&#62; &#60;div id="footer"&#62; &#60;p&#62;This is a sticky footer&#60;/p&#62; &#60;/div&#62; &#60;/body&#62; &#60;/html&#62; The CSS *{ margin: 0; } html, body{ height: 100%; } div#wrapper{ min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -150px; } div#footer, div.push{ height: 150px; }</p><p>The post <a href="http://jasonellis.ca/code-snippets/sticky-footer-with-push-div/">Sticky footer with push div</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>The HTML</p>
<pre>
&lt;html&gt;
    &lt;head&gt;		
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div id="wrapper"&gt;
	    &lt;p&gt;Your content goes here.&lt;/p&gt;
	    &lt;div class="push"&gt;&lt;/div&gt;
       &lt;/div&gt;
       &lt;div id="footer"&gt;
           &lt;p&gt;This is a sticky footer&lt;/p&gt;
       &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The CSS</p>
<pre>
*{
	margin: 0;
}
	
html,
body{
	height: 100%;
}
			
div#wrapper{
	min-height: 100%;
	height: auto !important;
	height: 100%;
	margin: 0 auto -150px;
}
			
div#footer,
div.push{
	height: 150px;
}
</pre>
<p>The post <a href="http://jasonellis.ca/code-snippets/sticky-footer-with-push-div/">Sticky footer with push div</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/code-snippets/sticky-footer-with-push-div/feed/</wfw:commentRss>
		<slash:comments>515</slash:comments>
		</item>
		<item>
		<title>301 Redirect with PHP</title>
		<link>http://jasonellis.ca/code-snippets/301-redirect-with-php/</link>
		<comments>http://jasonellis.ca/code-snippets/301-redirect-with-php/#comments</comments>
		<pubDate>Tue, 20 Nov 2012 16:52:42 +0000</pubDate>
		<dc:creator>Jason Ellis</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jasonellis.ca/?p=502</guid>
		<description><![CDATA[<p>&#60;? // 301 Redirect - if url contains www then redirect to non-www $current_path = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; if ( strpos($current_path,'www.') !== false ) { $current_path = str_replace('www.','',$current_path); header( "HTTP/1.1 301 Moved Permanently" ); header( "Location: $current_path" ); } ?&#62;</p><p>The post <a href="http://jasonellis.ca/code-snippets/301-redirect-with-php/">301 Redirect with PHP</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></description>
				<content:encoded><![CDATA[<pre>
&lt;?
// 301 Redirect - if url contains www then redirect to non-www
$current_path = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

if ( strpos($current_path,'www.') !== false ) {
	$current_path = str_replace('www.','',$current_path);
	header( "HTTP/1.1 301 Moved Permanently" );
	header( "Location: $current_path" );
}
?&gt; 
</pre>
<p>The post <a href="http://jasonellis.ca/code-snippets/301-redirect-with-php/">301 Redirect with PHP</a> appeared first on <a href="http://jasonellis.ca">Jason Ellis</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://jasonellis.ca/code-snippets/301-redirect-with-php/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>
