<?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>Web designer London &#124; Joe Smalley</title>
	<atom:link href="http://www.joesmalley.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joesmalley.com</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 11:19:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=435</generator>
		<item>
		<title>Increase WordPress upload size limit</title>
		<link>http://www.joesmalley.com/blog/2012/05/09/increase-wordpress-upload-size-limit/</link>
		<comments>http://www.joesmalley.com/blog/2012/05/09/increase-wordpress-upload-size-limit/#comments</comments>
		<pubDate>Wed, 09 May 2012 11:19:24 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1310</guid>
		<description><![CDATA[I found this useful to increase the WordPress upload size limit. Not only will it increase the upload size limit, but it increases the memory restriction for resizing images too. So if you have a large image for which WordPress can&#8217;t create the thumbnail for, try this. Place this code in /wp-admin/php.ini:]]></description>
			<content:encoded><![CDATA[<p>I found this useful to increase the WordPress upload size limit. Not only will it increase the upload size limit, but it increases the memory restriction for resizing images too. So if you have a large image for which WordPress can&#8217;t create the thumbnail for, try this.</p>
<p>Place this code in /wp-admin/php.ini:</p>
<p><pre class="brush: php; title: ; notranslate">
memory_limit = 256M
upload_max_filesize = &quot;64M&quot;
post_max_size = &quot;64M&quot;
max_execution_time = &quot;500&quot;
max_input_time = &quot;500&quot;
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2012/05/09/increase-wordpress-upload-size-limit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Find if your post is in a particular category</title>
		<link>http://www.joesmalley.com/blog/2011/04/21/wordpress-find-if-your-post-is-in-a-particular-category/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/21/wordpress-find-if-your-post-is-in-a-particular-category/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 15:30:43 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1109</guid>
		<description><![CDATA[Put this in your theme&#8217;s functions.php file: Usage:]]></description>
			<content:encoded><![CDATA[Put this in your theme&#8217;s functions.php file:

<pre class="brush: php; title: ; notranslate">function is_in_cats($catID){
 global $post;

 foreach((get_the_category($post-&gt;ID)) as $cat) {
 if( in_array($catID, get_category_array()) ){
 return true;
 }
 }
 return false;
}</pre>

Usage:

<pre class="brush: php; title: ; notranslate">

if(is_in_cats(5)){

echo &quot;Post is in category 5&quot;;

} else {

echo &quot;Post is not in category 5&quot;;

}

</pre>]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/21/wordpress-find-if-your-post-is-in-a-particular-category/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Change the excerpt length in the loop / on-the-fly</title>
		<link>http://www.joesmalley.com/blog/2011/04/21/wordpress-change-the-excerpt-length-in-the-loop-on-the-fly/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/21/wordpress-change-the-excerpt-length-in-the-loop-on-the-fly/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 15:25:14 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1106</guid>
		<description><![CDATA[This function allows you to display a custom except length which you can change at various points in your theme&#8217;s template file. On a website I needed the first post to have a longer except than the subsequent ones. So I used the regular the_excerpt() function to display my first (longer) excerpt, then for subsequent [...]]]></description>
			<content:encoded><![CDATA[This function allows you to display a custom except length which you can change at various points in your theme&#8217;s template file. On a website I needed the first post to have a longer except than the subsequent ones. So I used the regular the_excerpt() function to display my first (longer) excerpt, then for subsequent posts used this new function to display a shorter one.

Place this in your theme&#8217;s functions.php file:

<pre class="brush: php; title: ; notranslate">function custom_excerpt($length){
 global $post;
 $content = strip_tags($post-&gt;post_content);
 preg_match('/^\s*+(?:\S++\s*+){1,'.$length.'}/', $content, $matches);
 echo &quot;&lt;p&gt;&quot; . $matches[0] . &quot;&lt;/p&gt;&quot;;
}</pre>

Use it like this, changing the argument for the number of words you want:

<pre class="brush: php; title: ; notranslate">custom_excerpt(20);</pre>]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/21/wordpress-change-the-excerpt-length-in-the-loop-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: Server migration (404s, broken images, broken links etc)</title>
		<link>http://www.joesmalley.com/blog/2011/04/05/wordpress-server-migration-404s-broken-links-etc/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/05/wordpress-server-migration-404s-broken-links-etc/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 19:00:46 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1100</guid>
		<description><![CDATA[Moving your WordPress website to a different server? You need to do the following: Download all files from your old server via FTP. Don&#8217;t forget /wp-content/uploads/ and /wp-content/plugins/ &#8211; you may have uploaded files or updated plugins. Upload the files to the new server via FTP Export the MySQL database from the old server as [...]]]></description>
			<content:encoded><![CDATA[<p>Moving your WordPress website to a different server? You need to do the following:</p>
<ol>
<li>Download all files from your old server via FTP. Don&#8217;t forget /wp-content/uploads/ and /wp-content/plugins/ &#8211; you may have uploaded files or updated plugins.</li>
<li>Upload the files to the new server via FTP</li>
<li>Export the MySQL database from the old server as a file</li>
<li>Import export file into a new MySQL database on the new server</li>
<li>Amend /wp-config.php with the new database login details</li>
</ol>
<p>With this done, your new website will probably show a 404 error page, and your image URLs and hyperlinks will still reference the old server address. What to do? You need to run these 4 SQL commands on your new database, replacing www.olddomain.com and www.newdomain.com in each instance:</p>
<p><pre class="brush: sql; title: ; notranslate">UPDATE wp_options SET option_value = replace(option_value, 'http://www.olddomain.com','http://www.newdomain.com');</pre></p>
<p><pre class="brush: sql; title: ; notranslate">UPDATE wp_posts SET guid = replace(guid, 'http://www.olddomain.com','http://www.newdomain.com');</pre></p>
<p><pre class="brush: sql; title: ; notranslate">UPDATE wp_posts SET post_content = replace(post_content, 'http://www.olddomain.com','http://www.newdomain.com');</pre></p>
<p><pre class="brush: sql; title: ; notranslate">UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.olddomain.com','http://www.newdomain.com');</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/05/wordpress-server-migration-404s-broken-links-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Exclude categories from the_category()</title>
		<link>http://www.joesmalley.com/blog/2011/04/04/wordpress-exclude-categories-from-the_category/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/04/wordpress-exclude-categories-from-the_category/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 11:13:03 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1097</guid>
		<description><![CDATA[Put this in functions.php: Usage: Call it in your template file like this:]]></description>
			<content:encoded><![CDATA[<p>Put this in functions.php:</p>
<p><pre class="brush: php; title: ; notranslate">
function the_excluded_category($excludedcats = array()){
	$count = 0;
	$categories = get_the_category();
	foreach($categories as $category) {
		$count++;
		if ( !in_array($category-&gt;cat_ID, $excludedcats) ) {
			echo '&lt;a href=&quot;' . get_category_link( $category-&gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;Cortos de %s&quot; ), $category-&gt;name ) . '&quot; ' . '&gt;' . $category-&gt;name.'&lt;/a&gt;';

			if( $count != count($categories)-1 ){
				echo &quot;, &quot;;
			}

		}
	}
}
</pre></p>
<p><strong>Usage:<br />
</strong>Call it in your template file like this:</p>
<p><pre class="brush: php; title: ; notranslate">

&lt;?php the_excluded_category(array(1,328,338,339)); ?&gt;

</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/04/wordpress-exclude-categories-from-the_category/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Return a list of page ID&#8217;s from array of page objects</title>
		<link>http://www.joesmalley.com/blog/2011/04/01/wordpress-return-array-of-page-ids-from-array-of-page-objects/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/01/wordpress-return-array-of-page-ids-from-array-of-page-objects/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:46:59 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1092</guid>
		<description><![CDATA[Insert this in your theme&#8217;s functions.php file: Usage:]]></description>
			<content:encoded><![CDATA[<p>Insert this in your theme&#8217;s functions.php file:</p>
<p><pre class="brush: php; title: ; notranslate">

function create_id_list($pages, $explode = false){
 $pagelist = array();
 foreach ($pages as $pagg){
 $pagelist[] = $pagg-&gt;ID;
 }
 if($explode == true){
 return implode(&quot;,&quot;, $pagelist);
 } else {
 return $pagelist;
 }
}

</pre></p>
<p><strong>Usage:</strong></p>
<p><pre class="brush: php; title: ; notranslate">

$mypages = get_pages('child_of='.$post-&gt;ID.'&amp;sort_column=post_date&amp;sort_order=desc');

$idlist = create_id_list($mypages); // Returns an array
$idlistcsv = create_id_list($mypages, true); // Returns a comma-separated list

</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/01/wordpress-return-array-of-page-ids-from-array-of-page-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Get array of post&#8217;s categories</title>
		<link>http://www.joesmalley.com/blog/2011/04/01/wordpress-get-array-of-posts-categories/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/01/wordpress-get-array-of-posts-categories/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:44:16 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1088</guid>
		<description><![CDATA[Insert this in your functions.php  file:]]></description>
			<content:encoded><![CDATA[<p>Insert this in your functions.php  file:</p>
<p><pre class="brush: php; title: ; notranslate">

// Returns an array of the current post's categories
function get_category_array(){
 global $post;
 $cat_array = array();

 foreach((get_the_category()) as $category) {
 $cat_array .= $category-&gt;cat_ID;
 }
 return $cat_array;
}

</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/01/wordpress-get-array-of-posts-categories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Redirect to first child page</title>
		<link>http://www.joesmalley.com/blog/2011/04/01/wordpress-redirect-to-first-child-page/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/01/wordpress-redirect-to-first-child-page/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:24:52 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1081</guid>
		<description><![CDATA[Add this to whichever of your theme&#8217;s template files you want to redirect:]]></description>
			<content:encoded><![CDATA[<p>Add this to whichever of your theme&#8217;s template files you want to redirect:</p>
<p><pre class="brush: php; title: ; notranslate">

// Redirect to first child page. Place this in the loop.
function redirect_to_first_child(){
 $pagekids = get_pages(&quot;child_of=&quot;.$post-&gt;ID.&quot;&amp;sort_column=menu_order&quot;);
 if ($pagekids) {
 $firstchild = $pagekids[0];
 wp_redirect(get_permalink($firstchild-&gt;ID));
 }
}

</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/01/wordpress-redirect-to-first-child-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Does a page have children? With has_children()</title>
		<link>http://www.joesmalley.com/blog/2011/04/01/wordpress-does-a-page-have-children-with-has_children/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/01/wordpress-does-a-page-have-children-with-has_children/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:21:41 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1076</guid>
		<description><![CDATA[Add this to your functions.php file:]]></description>
			<content:encoded><![CDATA[<p>Add this to your functions.php file:</p>
<p><pre class="brush: php; title: ; notranslate">

function has_children(){
 global $post;

 if( ($post-&gt;post_parent == 0 &amp;&amp; wp_list_pages('title_li=&amp;child_of='.$post-&gt;ID.'&amp;echo=0'))
 ||
 ($post-&gt;post_parent &gt; 0 &amp;&amp; wp_list_pages('title_li=&amp;child_of='.$post-&gt;post_parent.'&amp;echo=0'))
 ){
 return true;
 } else {
 return false;
 }
}

</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/01/wordpress-does-a-page-have-children-with-has_children/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Change the link text after the excerpt</title>
		<link>http://www.joesmalley.com/blog/2011/04/01/wordpress-change-the-link-text-after-the-excerpt/</link>
		<comments>http://www.joesmalley.com/blog/2011/04/01/wordpress-change-the-link-text-after-the-excerpt/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:17:34 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Wordpress functions]]></category>

		<guid isPermaLink="false">http://www.joesmalley.com/?p=1073</guid>
		<description><![CDATA[Add this to your functions.php file: You can change the return code to change the text added to the link, or change this for an image for instance.]]></description>
			<content:encoded><![CDATA[<p>Add this to your functions.php file:</p>
<p><pre class="brush: php; title: ; notranslate">

function new_excerpt_more($more){
global $post;
return &quot; [...]&lt;br/&gt; &lt;a href='&quot;.get_permalink() .&quot;#post-&quot;.$post-&gt;ID.&quot;' class='read-more'&gt;Read More &gt;&lt;/a&gt;&quot;;
}
add_filter('excerpt_more', 'new_excerpt_more');

</pre></p>
<p>You can change the return code to change the text added to the link, or change this for an image for instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesmalley.com/blog/2011/04/01/wordpress-change-the-link-text-after-the-excerpt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

