<?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>Bluelime Media &#187; Tutorials</title>
	<atom:link href="http://www.bluelimemedia.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bluelimemedia.com</link>
	<description>Custom WordPress Development</description>
	<lastBuildDate>Wed, 01 Feb 2012 01:11:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Writing and Publishing Posts in WordPress</title>
		<link>http://www.bluelimemedia.com/2011/08/24/writing-and-publishing-posts-in-wordpress/</link>
		<comments>http://www.bluelimemedia.com/2011/08/24/writing-and-publishing-posts-in-wordpress/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 19:49:08 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=2342</guid>
		<description><![CDATA[If you are new to WordPress, one of the first thing you&#8217;ll need to learn is how to write and publish posts. This short video by Michael Pick covers this topic very elegantly. The video is a few years old and your dashboard may not look exactly the same, but<br /><a href="http://www.bluelimemedia.com/2011/08/24/writing-and-publishing-posts-in-wordpress/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>If you are new to WordPress, one of the first thing you&#8217;ll need to learn is how to write and publish posts. This short video by Michael Pick covers this topic very elegantly. The video is a few years old and your dashboard may not look exactly the same, but the principles are the same and this should give you a great starting point. </p>
<p><embed type="application/x-shockwave-flash" src="http://s0.videopress.com/player.swf?v=1.03" width="600" height="336" wmode="direct" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=a81PKPUD&amp;isDynamicSeeking=true"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2011/08/24/writing-and-publishing-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display random image in sidebar using Custom Post Types</title>
		<link>http://www.bluelimemedia.com/2011/02/25/display-random-image-in-sidebar-using-custom-post-types/</link>
		<comments>http://www.bluelimemedia.com/2011/02/25/display-random-image-in-sidebar-using-custom-post-types/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 18:07:59 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=2028</guid>
		<description><![CDATA[I recently created a website for Vancouver&#8217;s newest Tourist Attraction, the Pink Bus Tour. Later this summer, Vancouver residents will witness the Pink Bus carrying tourists around the city. A big part of the website was to showcase the highlights of the city. These highlights are simply pages within the<br /><a href="http://www.bluelimemedia.com/2011/02/25/display-random-image-in-sidebar-using-custom-post-types/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently created a website for Vancouver&#8217;s newest Tourist Attraction, the <a href="http://www.vancouverpinkbustours.com">Pink Bus Tour</a>. Later this summer, Vancouver residents will witness the Pink Bus carrying tourists around the city. A big part of the website was to showcase the highlights of the city. These highlights are simply pages within the CMS and my goal was to randomly display a &#8220;highlight&#8221; in the sidebar.</p>
<p>The highlights in the sidebar were easy to make. They simply consist of an image and a link. The problem was how to pull an image and link at random AND make it easy for the staff at Vancouver Pink Bus to add new images and links once available.</p>
<p>Using a <a href="http://codex.wordpress.org/Post_Types#Custom_Types">Custom Post Type</a> seemed to be the easiest way to go about this. To create the custom post type, I added the following to my functions.php file:</p>
<pre><code>// Custom Highlight in sidebar
   add_action('init', 'create_highlight');
     function create_highlight() {
       $highlight_args = array(
          'labels' =&gt; array(
           'name' =&gt; __( 'Highlights' ),
           'singular_name' =&gt; __( 'Highlight' ),
           'add_new' =&gt; __( 'Add New Item' ),
           'add_new_item' =&gt; __( 'Add New Highlight Item' ),
           'edit_item' =&gt; __( 'Edit Highlight Item' ),
           'new_item' =&gt; __( 'Add New Highlight Item' ),
           'view_item' =&gt; __( 'View Item' ),
           'search_items' =&gt; __( 'Search Highlight' ),
           'not_found' =&gt; __( 'No highlight items found' ),
           'not_found_in_trash' =&gt; __( 'No highlight items found in trash' )
         ),
       'public' =&gt; true,
       'show_ui' =&gt; true,
       'capability_type' =&gt; 'post',
       'hierarchical' =&gt; false,
       'rewrite' =&gt; true,
       'menu_position' =&gt; 20,
       'supports' =&gt; array('title', 'editor')
     );
  register_post_type('highlight',$highlight_args);
}
add_filter("manage_edit-highlight_columns", "highlight_edit_columns");
add_action("manage_posts_custom_column",  "highlight_columns_display");

function highlight_edit_columns($highlight_columns){
   $highlight_columns = array(
      "cb" =&gt; "&lt;input type=\"checkbox\" /&gt;",
      "title" =&gt; "Title",
   );
  return $highlight_columns;
}
 function highlight_columns_display($highlight_columns){
 switch ($highlight_columns)
 {
   case "description":
   the_excerpt();
   break;               
 }
}
</code></pre>
<p>Once this code in place, the highlights were ready to be populated. Now when a new sidebar image is needed, the folks at Vancouver Pink Bus simply upload a new polaroid image, link it to the page (made so much easier now WordPress 3.1 internal linking feature) and that&#8217;s it.</p>
<p>The final step is to display, at random, one of these custom post types. This was done by adding the following to my sidebar:</p>
<pre><code>&lt;h3&gt;Highlights Include&lt;/h3&gt;
&lt;?php
 $loop = new WP_Query(array(
  'post_type' =&gt; 'highlight',
  'posts_per_page' =&gt; 1,
  'orderby'=&gt;'rand'
 ));
?&gt;
&lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
  &lt;?php the_content(); ?&gt;
&lt;?php endwhile; ?&gt; </code></pre>
<p>To find out more about Custom Post Types, I highly recommend <a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress">Justin&#8217;s post</a> and <a href="http://wordpress.org/extend/themes/portfolio-press">Devin&#8217;s Portfolio Theme</a>. With both this tutorial and theme, you&#8217;ll be on your way to creating multiple Custom Post Types.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2011/02/25/display-random-image-in-sidebar-using-custom-post-types/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting up WordPress for development</title>
		<link>http://www.bluelimemedia.com/2011/01/31/setting-up-wordpress-for-developmen/</link>
		<comments>http://www.bluelimemedia.com/2011/01/31/setting-up-wordpress-for-developmen/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 00:37:29 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Bluelime News]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=2012</guid>
		<description><![CDATA[If you&#8217;re like me, chances are, you won&#8217;t be building and launching a site in a day. Websites take time to set up, design, populate with content and test. As a web designers you will probably have clients who fall in one of these situations. The client has a site,<br /><a href="http://www.bluelimemedia.com/2011/01/31/setting-up-wordpress-for-developmen/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, chances are, you won&#8217;t be building and launching a site in a day. Websites take time to set up, design, populate with content and test. As a web designers you will probably have clients who fall in one of these situations.</p>
<ul>
<li>The client has a site, but requires a new one;</li>
<li>The client has nothing and needs a site.</li>
</ul>
<p>Regardless of the situation, it&#8217;s best to develop the site in a folder that&#8217;s hidden from view. I usually like to develop my site in a wp folder. When people navigate to the site I&#8217;m working on they will see the current site or a <em>Coming Soon</em> page at www.domainname.com and the WordPress site in development will be at www.domainname.com/wp.</p>
<p>Another good thing to do while you are developing a site, is to set <strong>Privacy Settings</strong> to the second option &#8220;<em>I would like to block search engines, but allow normal visitors</em>&#8220;.</p>
<p>When you are ready to launch, giving WordPress its own directory takes only a few minutes.</p>
<ol>
<li>Navigate to <strong>Settings &gt; General</strong> in your admin. Change the <strong>Site url</strong> from www.domainname.com/wp to www.domainname.com. <strong>DO NOT TOUCH WordPress url</strong>. Hit Save.</li>
<li>In your FTP, navigate to your wp folder and <strong>download the <code>.htaccess</code> and <code>index.php</code> files</strong>. (Uploading them to your desktop is fine. You won&#8217;t need to keep these once you are done.)</li>
<li>Open the index.php in your text editor and change the line that says:<br />
<code>require('./wp-blog-header.php');</code><br />
to<br />
<code>require('./wp/wp-blog-header.php');</code></li>
<li>Save the file.</li>
<li>Delete the old site from your root folder (making a back up might be a good idea) or the <em>Coming Soon</em> page.</li>
<li><strong>Upload</strong> this revised <code>index.php</code> and the <code>.htaccess</code> files to your <strong>root folder</strong>.</li>
</ol>
<p>That&#8217;s it. You should now be able to see the site at www.domainname.com and access the WordPress admin at www.domainname.com/wp.</p>
<p>Don&#8217;t forget to change the privacy settings back to the first option, allowing Search engine to find your site.</p>
<p>These instructions are also <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">found in the codex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2011/01/31/setting-up-wordpress-for-developmen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding pagination to your blog</title>
		<link>http://www.bluelimemedia.com/2011/01/20/adding-pagination-to-your-blog/</link>
		<comments>http://www.bluelimemedia.com/2011/01/20/adding-pagination-to-your-blog/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 23:08:01 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=2008</guid>
		<description><![CDATA[Most WordPress themes come bundled up with “next page” and “previous page” links allowing you to navigate from older posts or newer posts. (The number of posts displayed on your blog overview and archives can be set in the Settings &#62; Reading section of your admin.) These links are great,<br /><a href="http://www.bluelimemedia.com/2011/01/20/adding-pagination-to-your-blog/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Most WordPress themes come bundled up with “next page” and “previous page” links allowing you to navigate from older posts or newer posts. (<em>The number of posts displayed on your blog overview and archives can be set in the Settings &gt; Reading section of your admin.</em>)</p>
<p>These links are great, but they can be improved by pagination which clearly indicates how many pages there are. As always there are many <a href="http://wordpress.org/extend/plugins/tags/pagination">WordPress plugins</a> for this, but there&#8217;s really no need. I personally prefer to keep plugins to a minimal and thus found the following tutorials very useful.</p>
<p><a href="http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin"><br />
Kreisi&#8217;s tutorial</a> provides you with all of the code that you need to add pagination to your site. Once you&#8217;ve read his detailed information take a look at <a href="http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/">Veron&#8217;s post</a> at Sparklette Studio. She made a few modifications and enhancements to the code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2011/01/20/adding-pagination-to-your-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing ellipses from WordPress excerpts</title>
		<link>http://www.bluelimemedia.com/2011/01/20/removing-elipses-from-excerpts/</link>
		<comments>http://www.bluelimemedia.com/2011/01/20/removing-elipses-from-excerpts/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 22:07:03 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=2005</guid>
		<description><![CDATA[WordPress allows you to display either the full content or excerpts of your posts. When creating a template for search results, I do find that displaying excerpts rather than a full post improves usability. However if you simply use the excerpt function, you&#8217;ll notice that ellipses [...] are added at<br /><a href="http://www.bluelimemedia.com/2011/01/20/removing-elipses-from-excerpts/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>WordPress allows you to display either the full content or excerpts of your posts.</p>
<p>When creating a template for search results, I do find that displaying excerpts rather than a full post improves usability. However if you simply use the excerpt function, you&#8217;ll notice that ellipses [...] are added at the end.</p>
<p>Personally I don&#8217;t find these useful at all and would prefer to have a link.</p>
<p>An easy way to fix this is by inserting the following code in your functions file:</p>
<pre><code>function custom_excerpt_more($more) {
return '&lt;br /&gt;&lt;a href="'. get_permalink() .'"&gt;read more&lt;/a&gt;';
}
add_filter('excerpt_more', 'custom_excerpt_more');</code></pre>
<p>This will insert a break tag and add a link to the rest of the post.</p>
<p>You can also control the length of your excerpts if you wish. Simply add the following to your functions file.</p>
<pre><code>function custom_excerpt_length($length) {
return 20;
}
add_filter('excerpt_length', 'custom_excerpt_length');</code></pre>
<p>This function will limit your excerpts to the first 20 words.<br />
Be careful though, if your post is less than 20 words, then the link won&#8217;t appear. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2011/01/20/removing-elipses-from-excerpts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display your latest tweet(s) on your website</title>
		<link>http://www.bluelimemedia.com/2010/08/11/display-your-latest-tweets-on-your-website/</link>
		<comments>http://www.bluelimemedia.com/2010/08/11/display-your-latest-tweets-on-your-website/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 16:18:49 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=1781</guid>
		<description><![CDATA[I recently worked with Magnify Digital on a website for a very interesting group of people in the Fraser Valley. These folks are concerned about Air Quality and thus have come up with a website and community to address these issues. A big part of the website was the social<br /><a href="http://www.bluelimemedia.com/2010/08/11/display-your-latest-tweets-on-your-website/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently worked with <a href="http://www.magnifydigital.com">Magnify Digital</a> on a website for a very interesting group of people in the Fraser Valley. These folks are <a href="http://www.airqualitymatters.ca/">concerned about Air Quality</a> and thus have come up with a website and community to address these issues.</p>
<p>A big part of the website was the social media aspect. Thus facebook, twitter and youtube feature prominently on the website. There are plenty of WordPress plugins that allow you to display your latest tweets, but I wanted a simpler solution. The following piece of code proved to be just what I needed:</p>
<pre><code>
&lt;?php
$username = "yourTwitterUsername";
$limit = "1"; // Number of tweets to pull in.

/* These prefixes and suffixes will display before and after the entire block of tweets. */
$prefix = ""; // Prefix - some text you want displayed before all your tweets.
$suffix = ""; // Suffix - some text you want displayed after all your tweets.
$tweetprefix = "&lt;p&gt;"; // Prefix - some text you want displayed before each tweet.
$tweetsuffix = "&lt;/p&gt;"; // Suffix - some text you want displayed after each tweet.

$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&amp;rpp=" . $limit;

function parse_feed($feed, $prefix, $tweetprefix, $tweetsuffix, $suffix) {

$feed = str_replace("&amp;lt;", "&lt;", $feed);
$feed = str_replace("&amp;gt;", "&gt;", $feed);
$feed = str_replace("&amp;quot;", "\"", $feed);
$feed = str_replace("&amp;apos;", "'", $feed);
$clean = explode("&lt;content type=\"html\"&gt;", $feed);

$amount = count($clean) - 1;

echo $prefix;

for ($i = 1; $i &lt;= $amount; $i++) {
$cleaner = explode("&lt;/content&gt;", $clean[$i]);
echo $tweetprefix;
echo $cleaner[0];
echo $tweetsuffix;
}

echo $suffix;
}

$twitterFeed = file_get_contents($feed);
parse_feed($twitterFeed, $prefix, $tweetprefix, $tweetsuffix, $suffix);
?&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2010/08/11/display-your-latest-tweets-on-your-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Incorporate Cufón in WordPress</title>
		<link>http://www.bluelimemedia.com/2009/09/08/incorporate-cufon-in-wordpress/</link>
		<comments>http://www.bluelimemedia.com/2009/09/08/incorporate-cufon-in-wordpress/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 15:08:53 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=975</guid>
		<description><![CDATA[Every once in a while comes a project where using a font other than verdana, arial, trebuchet or tahoma would be nice. I recently finished a website for Tod Maffin where, Rob, the designer chose Sansa Condensed as the font of choice for headings. I could have created images for<br /><a href="http://www.bluelimemedia.com/2009/09/08/incorporate-cufon-in-wordpress/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Every once in a while comes a project where using a font other than verdana, arial, trebuchet or tahoma would be nice. I recently finished a website for <a href="http://www.todmaffin.com">Tod Maffin</a> where, <a href="http://www.roundpeg.ca">Rob</a>, the designer chose Sansa Condensed as the font of choice for headings. I could have created images for all of the page headings, but I wanted to give Tod the ability to update them if he chose to and more importantly, I also wanted to use the same font for the headings of blog posts. After <a href="http://www.mezzoblue.com/archives/2009/05/07/font_embeddi/">reading about the alternatives</a>, I decided to give <a href="http://wiki.github.com/sorccu/cufon/about">cufón</a> a try and was quite surprised to discover how easy it is.</p>
<p>Here are the steps required to integrate cufón in your wordPress site:</p>
<p><strong>Step 1 &#8211; Get cufón</strong><br />
Visit the <a href="http://cufon.shoqolate.com/generate/">cufón website</a> and download the <a href="http://cufon.shoqolate.com/js/cufon-yui.js">YUI-compressed version of cufón</a>. Save this js file in a js folder in your wordPress theme.</p>
<p><strong>Step 2 &#8211; Generate your font file</strong><br />
Follow the steps on the <a href="http://cufon.shoqolate.com/generate/">Cufón website</a> and add the generated js file to your js folder in your wordPress theme. You&#8217;ll be required to upload your font files and thus you need to have purchased them as well as verified that your <a href="http://www.fontembedding.com/fonts-and-the-law/">fonts are legal to use</a> in font embedding. Upload your js folder in your wordPress theme via FTP.</p>
<p><strong>Step 3 &#8211; Add the code to your wordPress template</strong><br />
To use cufón, simply add the following lines of code to your header.php file.</p>
<pre><code>
&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/js/cufon-yui.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/js/your_cufon_generated_font_file.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
 Cufon.replace('h1');
 Cufon.replace('h2');
&lt;/script&gt;
</code></pre>
<p>These few lines of code will convert all of your h1 and h2 into my selected font. That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2009/09/08/incorporate-cufon-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How to use Slimbox plugin to display your portfolio in WordPress</title>
		<link>http://www.bluelimemedia.com/2009/07/22/how-to-use-slimbox-plugin/</link>
		<comments>http://www.bluelimemedia.com/2009/07/22/how-to-use-slimbox-plugin/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:59:20 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=942</guid>
		<description><![CDATA[If you&#8217;ve been following the Bluelime Media website you will know that we&#8217;ve partnered with Barbara from BlueCitrus on many occasions to develop websites and as the saying goes, &#8220;The son of the cobbler has no shoes&#8220;, the BlueCitrus website was in need of a facelift. My latest teaching gig<br /><a href="http://www.bluelimemedia.com/2009/07/22/how-to-use-slimbox-plugin/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been following the Bluelime Media website you will know that we&#8217;ve partnered with Barbara from <a href="http://www.bluecitrus.com">BlueCitrus</a> on many occasions to develop websites and as the saying goes, &#8220;<em>The son of the cobbler has no shoes</em>&#8220;, the BlueCitrus website was in need of a facelift. My latest teaching gig at Langara provided me with the opportunity to design and develop a WordPress site for Barbara. The goal of the class was to teach the students how to use WordPress to create a portfolio. So building a site for Barbara was the perfect project.</p>
<p>Barbara laid the ground work and designed the header, navigation and gave me a good indication of how she wanted the site to work, but I was given carte blanche on how to make the portfolio work. After looking at numerous portfolio examples, I came across the stunning work of <a href="http://www.koldobarroso.com/">Koldo Barroso</a>. Koldo&#8217;s illustrations are simply marvelous and I could look at them all day. His portfolio section is simple, yet very elegant. On closer examination of his site, I noticed that he uses <a href="http://www.digitalia.be/software/slimbox">Slimbox</a> to display his gallery pieces which is just a slimmed down version of <a href="http://en.wikipedia.org/wiki/Lightbox_%28JavaScript%29">the original Lightbox</a>.</p>
<p>A few clicks later, I read a few tutorials on how to use Slimbox and decided to use it to build it Barbara&#8217;s portfolio section. If you&#8217;re familiar with WordPress plugins, you&#8217;ll know that beyond how to install and activate, instructions are usually fairly slim when it comes to how to use them. Since I just finished the site and the steps I took are still fresh in my mind, I thought I&#8217;d walk you through on how to set your own gallery using the Slimbox Plugin.</p>
<p><span id="more-942"></span><br />
<strong>Step 1:</strong><br />
<strong>Download the <a href="http://wordpress.org/extend/plugins/slimbox-plugin/">Slimbox plugin</a>, upload it to your plugins folder and activate it.</strong></p>
<p><strong>Step 2:</strong><br />
<strong>Get your portfolio images ready.</strong> During the design process, I came to the decision of making my large images 500px x 405px and the thumbnails 110px x 80px. In my WordPress admin, under Media, I set the size of my thumbnails to 110px and 80px. I then proceeded to create all of the portfolio images and uploaded them using WordPress&#8217;s media tool. During this process, WordPress automatically created corresponding thumbnails and added a <em>-100&#215;80.jpg </em>extension to them. The thumbnails weren&#8217;t exactly as Barbara had hoped for, so I downloaded them all, she tweaked them in Photoshop ensuring the the same names were kept, I then re-uploaded them to the server and replaced the old ones.</p>
<p><strong>Step3:</strong><br />
Once the images in the media library, it was time to add them to the WordPress Websites Page. I opted for a unordered list of items to display the thumbnails.</p>
<p>Using the image insert tool, I selected the image to show, fine-tuned the title of the image, ensured that the file url was selected, selected the thumbnail size and clicked insert into post.</p>
<p><a href="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/07/photo.gif"><img class="alignnone size-full wp-image-944" title="photo" src="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/07/photo.gif" alt="photo" width="622" height="441" /></a></p>
<p>Which gave me the following line of code.</p>
<pre><code> &lt;ul class="thumbnails"&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image1.jpg"&gt;&lt;img title="Portfolio Piece 1" src="http://www.domainname.com/wp-content/uploads/image1-100x80.jpg" alt="Portfolio Piece 1" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;</code></pre>
<p>In order to activate the lightbox, I then inserted rel=&#8221;lightbox&#8221; to the anchor tag.</p>
<pre><code> &lt;ul class="thumbnails"&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image1.jpg" rel="lightbox"&gt;&lt;img title="Portfolio Piece 1" src="http://www.domainname.com/wp-content/uploads/image1-100x80.jpg" alt="Portfolio Piece 1" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;</code></pre>
<p>In order to display the caption under the image a title must also be added to the anchor tag.</p>
<pre><code> &lt;ul class="thumbnails"&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image1.jpg" rel="lightbox" title="Portfolio Piece 1"&gt;&lt;img title="Portfolio Piece 1" src="http://www.domainname.com/wp-content/uploads/image1-100x80.jpg" alt="Portfolio Piece 1" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;</code></pre>
<p>This code now works perfectly, but you probably want to display more than one image. All you need to do is repeat the process and modify the relative attribute. Instead of using rel=&#8221;lightbox&#8221; I used rel=&#8221;lightbox-website&#8221; on all anchor tags. Modifying the relative attribute this way activates the previous and next links on the images.</p>
<pre><code> &lt;ul class="thumbnails"&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image1.jpg" rel="lightbox-website" title="Portfolio Piece 1"&gt;&lt;img title="Portfolio Piece 1" src="http://www.domainname.com/wp-content/uploads/image1-100x80.jpg" alt="Portfolio Piece 1" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image2.jpg" rel="lightbox-website" title="Portfolio Piece 2"&gt;&lt;img title="Portfolio Piece 2" src="http://www.domainname.com/wp-content/uploads/image2-100x80.jpg" alt="Portfolio Piece 2" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;</code></pre>
<p>You&#8217;ll notice that on Barbara&#8217;s website, once you view the images in the lightbox, you can read the title of the image but also visit the website by clicking the link.  To do this, you need to add the link to your title.</p>
<p>So you might be tempted to using something like:</p>
<pre><code>title="Portfolio Piece 1 - &lt;a href="http://www.domainname.com" target="_blank"&gt;visit website&lt;/a&gt;"</code></pre>
<p>But you will soon find out that this doesn&#8217;t work. What you need to do is swap some of the characters for their html equivalent. For example, quotes (”) would be <code>&amp;quot;</code> and brackets (&lt;) would be <code>&amp;lt;</code>. So your final code will be something like this:</p>
<pre><code> &lt;ul class="thumbnails"&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image1.jpg" rel="lightbox-website" title="Portfolio Piece 1 - &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://www.domainname1.com/&amp;quot;&amp;gt;visit website&amp;lt;/a&amp;gt;"&gt;&lt;img title="Portfolio Piece 1" src="http://www.domainname.com/wp-content/uploads/image1-100x80.jpg" alt="Portfolio Piece 1" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="http://www.domainname.com/wp-content/uploads/image2.jpg" rel="lightbox-website" title="Portfolio Piece 2 - &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://www.domainname1.com/&amp;quot;&amp;gt;visit website&amp;lt;/a&amp;gt;"&gt;&lt;img title="Portfolio Piece 2" src="http://www.domainname.com/wp-content/uploads/image2-100x80.jpg" alt="Portfolio Piece 2" width="100" height="80" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;</code></pre>
<p><strong>Step4:</strong><br />
Once all your thumbnails are in place, you may want to adjust your style.css. Here&#8217;s what I used for the Bluecitrus website.</p>
<pre><code> ul.thumbnails {width:520px; list-style:none; margin:0; padding:0;} .thumbnails li {float:left; margin:5px 4px 5px 3px;} .thumbnails img {width:110px; height:80px; padding:5px; vertical-align:bottom;} .thumbnails a {border:1px solid #D4D4D4; background:#FFF; display:block; margin-bottom:5px; float:left;} .thumbnails a:hover img {background:#F9F9F9;}</code></pre>
<p><a href="http://www.bluecitrus.com/portfolio/websites/">You can see the final results here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2009/07/22/how-to-use-slimbox-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Enhance your WordPress site with Custom Fields</title>
		<link>http://www.bluelimemedia.com/2009/06/22/enhance-your-website-with-custom-fields/</link>
		<comments>http://www.bluelimemedia.com/2009/06/22/enhance-your-website-with-custom-fields/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 21:20:16 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=807</guid>
		<description><![CDATA[Over the years of converting other graphic designer&#8217;s design into WordPress templates, I&#8217;ve had to think of ways to keep the code simple and easy for clients to maintain the site once live. Working on a few challenging design lately has given me the opportunity to look at using custom<br /><a href="http://www.bluelimemedia.com/2009/06/22/enhance-your-website-with-custom-fields/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Over the years of converting other graphic designer&#8217;s design into WordPress templates, I&#8217;ve had to think of ways to keep the code simple and easy for clients to maintain the site once live. Working on a few challenging design lately has given me the opportunity to look at using <a href="http://codex.wordpress.org/Using_Custom_Fields">custom fields</a>.</p>
<p>You&#8217;ll find custom fields in your admin panel under all post and page text areas. These custom fields allow you to add extra information, technically termed meta-data, and allows you to add jazz up your posts or pages. Here are a few examples of how custom fields can be used:</p>
<p><span id="more-807"></span></p>
<h4>Add a style to your header</h4>
<p>Navigating through the various topic of one of our latest projects, &#8220;<a href="http://www.thechallengeseries.ca">The Challenge Series</a>&#8221; you&#8217;ll notice that the <a href="http://www.thechallengeseries.ca/chapter-01/sustainable-communities/">sustainability</a> section has a green title, while <a href="http://www.thechallengeseries.ca/chapter-01/history/">history</a> is orange, <a href="http://www.thechallengeseries.ca/chapter-01/policy/">policy</a> red and <a href="http://www.thechallengeseries.ca/chapter-01/design-concepts/">design concepts</a> blue.</p>
<p>This was achieved by doing the following:<br />
1. Adding a custom field called Colour and assigning it a value of green, orange, red of blue.<br />
<img class="alignnone size-full wp-image-808" title="Custom Field" src="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/06/custom-field.gif" alt="Custom Field" width="580" height="110" /></p>
<p>2. Editing the code in my index.php as follows:</p>
<pre><code>&lt;h1 class="&lt;?php $key="Colour"; echo get_post_meta($post-&gt;ID, $key, true); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;</code></pre>
<p>3. Setting up the appropriate styles in my CSS as follows:</p>
<pre><code>h1.orange {background:#F26F21 }
h1.green {background:#5D9632}
h1.red {background:#B22217}
h1.blue {background:#00728E}</code></pre>
<h4>Insert an image outside your content area</h4>
<p>During the build of the latest version of the <a href="http://www.crisiscentre.bc.ca/about-us/">Crisis Centre</a> website, the design required that a unique image be inserted in the top right hand corner of each page. Inserting the image within the main content entry would have required me to fiddle with the padding of my paragraph tags. Instead I opted to use a custom field and added this piece of code to my index.php template:</p>
<pre><code>&lt;div id="photo"&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/photos/&lt;?php $key="photo"; echo get_post_meta($post-&gt;ID, $key, true); ?&gt;" alt="" border="0" /&gt;&lt;/div&gt;</code></pre>
<p>This line of code, simply pulls the image specified in the custom field and inserts in a div tag which has its own unique style.</p>
<p>Although custom fields, can get a bit tricky, especially when using more than one per entry, they allow you to enhance your site and give you much more design freedom.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2009/06/22/enhance-your-website-with-custom-fields/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add social bookmarking icons to your sidebar without using widgets</title>
		<link>http://www.bluelimemedia.com/2009/03/18/add-social-bookmarking-icons-to-your-sidebar/</link>
		<comments>http://www.bluelimemedia.com/2009/03/18/add-social-bookmarking-icons-to-your-sidebar/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 01:46:15 +0000</pubDate>
		<dc:creator>Christine</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[social bookmarking]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.bluelimemedia.com/?p=688</guid>
		<description><![CDATA[As social bookmarking sites such as Twitter, Facebook and Linked in become more and more popular, these days, I find myself being asked to make adjustments to several WordPress websites by adding social bookmarking links and icons to the sidebar. After 2 such web updates this week, I was asked<br /><a href="http://www.bluelimemedia.com/2009/03/18/add-social-bookmarking-icons-to-your-sidebar/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>As social bookmarking sites such as <a href="http://www.twitter.com">Twitter</a>,<a href="http://www.facebook.com"> Facebook</a> and <a href="http://www.linkedin.com">Linked in</a> become more and more popular, these days, I find myself being asked to make adjustments to several WordPress websites by adding social bookmarking links and icons to the sidebar. After 2 such web updates this week, I was asked by a friend to send me the code so that they could add it to their site. So instead of doing the work and sending it to him, I thought I would share it with you all.</p>
<p>The following examples are just code snippets that you can add to your sidebar.php template file. These snippets will not work if your website use sidebar widgets. (That&#8217;s not exactly true, but it&#8217;s a bit more complicated.)</p>
<p>The first example is very simple and can be seen live on the <a href="http://www.kitsilano.ca">kitsilano.ca</a> website.</p>
<p style="text-align: center;"><a href="http://www.kitsilano.ca"><img class="alignnone size-full wp-image-689" style="border:1px solid #F6F6F6;" title="Kitsilano sidebar example" src="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/03/kits_sidebar.gif" alt="Kitsilano sidebar example" width="173" height="92" /></a></p>
<p>First you&#8217;ll need to edit your sidebar.php template and add the following lines of code:</p>
<pre><code>
&lt;h2&gt;Follow Us&lt;/h2&gt;
&lt;ul&gt;
&lt;li class="rss"&gt;
&lt;a href="[insert your rss link here]"&gt;Get our Feed&lt;/a&gt;
&lt;/li&gt;
&lt;li class="twitter"&gt;
&lt;a href="[insert your twitter link here]"&gt;On Twitter&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p>Next you can adjust the styling by adding this piece of code to your style.css</p>
<pre><code>
#sidebar li.rss {background:url(images/rss.gif) 0 50% no-repeat;}
#sidebar li.twitter {background:url(images/twitter.gif) 0 50%  no-repeat;}
#sidebar li.rss a, #sidebar li.twitter a {padding-left:20px;}
</code></pre>
<p>The icons will also have to be uploaded in your templates&#8217; images folder. You can use your own icons or grab the ones that I&#8217;ve used by downloading the <a href="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/03/socialbookmarking_examples.zip">zip file</a>.</p>
<p>The second example may look a bit more complex, but is just as easy and can be seen on the <a href="http://www.mudcreative.com">mudcreative.com</a> sidebar.</p>
<p style="text-align: center;"><a href="http://www.mudcreative.com"><img class="alignnone size-full wp-image-691" title="Mudcreative Social Bookmarking example" src="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/03/mudcreative.gif" alt="Mudcreative Social Bookmarking example" width="205" height="82" /></a></p>
<p>First insert these lines of code in your sidebar.php:</p>
<pre><code>
&lt;div id="social_media"&gt;
&lt;h2&gt;Follow Us&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="[insert your link to linked in here]"&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/linkedin.png" alt="View our linked in profile" width="32" height="32" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="[insert your link to twitter here]"&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/twitter.png" alt="On Twitter" width="32" height="32" border="0"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="[insert your link to rss feed here]"&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/rss.png" alt="Via our RSS feed" width="32" height="32" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="[insert your link to facebook here]"&gt;&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/facebook.png" alt="On Facebook" width="32" height="32" border="0"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</code></pre>
<p>Next, add the following to your style.css</p>
<pre><code>
#social_media {
width:200px;
background:#F2F7F7;
border:1px solid #ACD0D1;
padding: 0 0 5px 0; margin-bottom:10px;
}
#social_media ul {list-style-type:none; margin:0 0 0 6px; padding:0;}
#social_media ul li {display:inline; padding: 0 6px 0 0;}
</code></pre>
<p>Depending on what your stylesheet already contains, you may need to make a few tweaks, but it should be pretty straightforward. Here is <a href="http://www.bluelimemedia.com/wp/wp-content/uploads/2009/03/socialbookmarking_examples.zip">zip file</a> with the code snippets and icons. Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluelimemedia.com/2009/03/18/add-social-bookmarking-icons-to-your-sidebar/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

