<?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>Modern Web Design Articles and Tutorials &#187; Wordpress</title>
	<atom:link href="http://www.dlocc.com/articles/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dlocc.com/articles</link>
	<description></description>
	<lastBuildDate>Tue, 29 Nov 2011 09:52:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to Use a Facebook Like Button on Any Page</title>
		<link>http://www.dlocc.com/articles/how-to-use-a-facebook-like-button-on-any-page/</link>
		<comments>http://www.dlocc.com/articles/how-to-use-a-facebook-like-button-on-any-page/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 06:48:17 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=2230</guid>
		<description><![CDATA[The facebook like button is in. I know, you've been seeing it more and more around the web and now you want to implement it on your own website. I'll show you how to do just this using a little snippet of code that will allow you to add a dynamic Facebook "like" button to [...]]]></description>
			<content:encoded><![CDATA[<p>The facebook like button is in.  I know, you've been seeing it more and more around the web and now you want to implement it on your own website.  I'll show you how to do just this using a little snippet of code that will allow you to add a dynamic Facebook "like" button to any page on your website!</p>
<p><img src="http://www.dlocc.com/articles/wp-content/uploads/2010/07/facebook-like-button.jpg" alt="Implement a dynamic Facebook Like button" title="facebook-like-button" width="450" height="86" class="alignnone size-full wp-image-2237" /></p>
<span id="more-2230"></span>
<p>First off, why would you want this?  Let's say you have a blog and in the footer (or header... or sidebar) you'd like to have the facebook like button.  Well, it really isn't very practical to have to insert this in the footer of your post everytime you create a new entry.  Solution: let's leverage the power of PHP to make the Facebook like button dynamic!</p>
<h3>Facebook Like Button PHP Code</h3>

<pre class="brush: php; title: ; notranslate">
 &lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=&lt;?php echo rawurlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?&gt;&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=275&amp;amp;action=like&amp;amp;colorscheme=dark&amp;amp;height=35&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:275px; height:35px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
</pre>

<h4>Code Explanation</h4>
<p>What the code above will do is allow you to insert a <strong>dynamic like button</strong> in a common place on your website and have that button's url change according to the page the visitor is on (hence why I say dynamic).  For instance, on a WordPress site you could put the code in your sidebar.php file and the url to be 'liked' would be whatever page the visitor is on. </p>
<h4>Extra Tips</h4>
<p>If you don't want the url to change and only want the user to 'like' one url on your site (let's say the homepage for instance) then you could change the address to that static text.  This is in fact how the <a href="http://developers.facebook.com/docs/reference/plugins/like" title="Create a Facebook Like button">Facebook like button creation tool</a> works on their website.</p>
<p><strong>Also:</strong> Don't forget the power of PHP and, if you're on the WordPress CMS then you can also leverage the built in functions like bloginfo('url'); and more!  Simply replace </p>
<p>Hope you enjoy this snippet.  Also, FYI... Facebook has changed 'become a fan' to just like... Questions? Leave a comment below or <a href="/contact/" title="Contact DLOCC" />Contact DLOCC</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/how-to-use-a-facebook-like-button-on-any-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Setup XAMPP WordPress Virtual Hosts</title>
		<link>http://www.dlocc.com/articles/how-to-setup-xampp-wordpress-virtual-hosts/</link>
		<comments>http://www.dlocc.com/articles/how-to-setup-xampp-wordpress-virtual-hosts/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 02:07:53 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Virtual Hosting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=2216</guid>
		<description><![CDATA[I like to develop in a localized environment where I have to do minimal setup and configuration on the remote server when it's time to go live. Working with WordPress makes it very easy to do this and it's a breeze to setup with virtual hosts and the free XAMPP stack. Why do this? It [...]]]></description>
			<content:encoded><![CDATA[<p>I like to develop in a localized environment where I have to do minimal setup and configuration on the remote server when it's time to go live.  Working with WordPress makes it very easy to do this and it's a breeze to setup with virtual hosts and the free XAMPP stack.</p>

<p>Why do this?  It makes it very easy to move over the WordPress database when it's time to go live.  Developing locally is always in your best interest.  This method is preferred over 'going commando' because you can keep better control over your code and it's faster to develop.  Plus a whole slew of other reasons that you can Google if you feel like it.  Let's get started on setting up your WordPress install to use XAMPP's virtual hosting capabilities.</p> 
<img src="http://www.dlocc.com/articles/wp-content/uploads/2010/07/wordpress-apache-linux-mysql.jpg" alt="" title="wordpress-apache-linux-mysql" width="450" height="106" class="alignnone size-full wp-image-2226" />


<span id="more-2216"></span>

<p><strong>1.</strong> Open your <strong>Windows Hosts</strong> file by clicking on <strong><em>My Computer</em></strong> and navigating to "<strong>\Windows\system32\drivers\etc\</strong>"</p>

<img class="alignnone size-full wp-image-2217" title="system-files" src="http://www.dlocc.com/articles/wp-content/uploads/2010/07/system-files.jpg" alt="Windows Virtual Host Directory" width="541" height="232" />
<br  />

<p><strong>2.</strong> Add the following to the bottom of the hosts file by using your text editor of choice.  Notepad will work just fine.</p>

<p><strong>127.0.0.1    somesite.com<br />
127.0.0.1    www.somesite.com</strong></p>

<p>Note: Be sure to replace "somesite" with your actual WordPress website domain name</p>


<p><strong>3.</strong> Now navigate to your XAMPP <strong>httpd-vhosts.conf</strong> by navigating to: <strong>C:/XAMPP/apache/conf/extras</strong></p>

<img class="alignnone size-full wp-image-2219" title="http-vhosts" src="http://www.dlocc.com/articles/wp-content/uploads/2010/07/http-vhosts.jpg" alt="" width="550" height="415" />
<br  />

<p><strong>4</strong>. Uncomment the following line:</p>

<strong>NameVirtualHost *:80</strong>

<img class="alignnone size-full wp-image-2220" title="uncomment-line" src="http://www.dlocc.com/articles/wp-content/uploads/2010/07/uncomment-line.jpg" alt="Uncomment the following line in your XAMPP Virtual Hosts File" width="281" height="366" />
<br  />

<p><strong>5.</strong>Add the following at the bottom of the file and save the file before you close it:</p>


<pre class="brush: plain; title: ; notranslate">
&lt;VirtualHost *:80&gt;
DocumentRoot “E:/xampp/htdocs/”
ServerName localhost
ServerAlias localhost
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
DocumentRoot “E:/xampp/htdocs/somesite”
ServerName www.somesite.com
ServerAlias www.somesite.com
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
DocumentRoot “E:/xampp/htdocs/somesite”
ServerName somesite.com
ServerAlias somesite.com
&lt;/VirtualHost&gt;
</pre>

<br  />
<p><strong>Wait! One last thing...</strong> Now <strong>restart </strong> Apache and MySQL (using XAMMP) and you should be good to go when you navigate your browser to the url you specified for your WordPress installation using the tutorial above (once you restart the services).  If you have any comments or questions be sure to use the comment box below or the <a href="/contact/" title="Contact Devin Walker" >Contact DLOCC</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/how-to-setup-xampp-wordpress-virtual-hosts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress Heirarchical Sidebar Page Menus</title>
		<link>http://www.dlocc.com/articles/wordpress-heirarchical-sidebar-page-menus/</link>
		<comments>http://www.dlocc.com/articles/wordpress-heirarchical-sidebar-page-menus/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 00:49:56 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=2171</guid>
		<description><![CDATA[Let's say you want to show a hierarchical sidebar menu that displays a listing of current subpages. This is easy enough, but let's say that you have a top menu that shows all top-level pages. Once you click on a top level page from that menu it will take you there and in the sidebar [...]]]></description>
			<content:encoded><![CDATA[Let's say you want to show a hierarchical sidebar menu that displays a listing of current subpages.  This is easy enough, but let's say that you have a top menu that shows all top-level pages.  Once you click on a top level page from that menu it will take you there and in the sidebar show all subsequent child pages.  Now what if those child pages have a child?  You don't want all menu items to disappear when you click on one of those child pages.  That just looks funny.  Here's the bit of code that works great for me:


<pre class="brush: php; title: ; notranslate">
&lt;?php 
if ((count($post-&gt;ancestors) &gt; 0) 
        &amp;&amp; ($data = array_reverse($post-&gt;ancestors)) 
        &amp;&amp; !is_null($data[0])){ 
	$data = wp_list_pages('title_li=&amp;echo=0&amp;child_of='.$data[0]); 
} else { 
        $data = wp_list_pages('title_li=&amp;echo=0&amp;child_of='.$post-&gt;ID); 	
} 
if (strlen($data) != '') {?&gt;
          &lt;ul class='nav'&gt;&lt;?php echo  $data; ?&gt;&lt;/ul&gt;	
&lt;?php } ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/wordpress-heirarchical-sidebar-page-menus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Alternating Classes</title>
		<link>http://www.dlocc.com/articles/wordpress-alternating-classes/</link>
		<comments>http://www.dlocc.com/articles/wordpress-alternating-classes/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 17:32:35 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=2122</guid>
		<description><![CDATA[It's often very useful to have alternating classes in for styling purposes. Let's say you want every other row to be a darker shading, this is very common and I'll show you how to implement this in WordPress using a simple bit of code. For my example here I will show you how to create [...]]]></description>
			<content:encoded><![CDATA[<p>It's often very useful to have alternating classes in for styling purposes.  Let's say you want every other row to be a darker shading, this is very common and I'll show you how to implement this in WordPress using a simple bit of code.</p>
<p>For my example here I will show you how to create alternating classes for use with the WordPress loop.  This way, when the loop pulls your posts from the db every post container will have a separate class name up to as many as we define in our array.  This method of alternating classes in WordPress will work for wherever you have a loop.  Therefore, your comments, categories, tags, etc. can all be styled up using this method.  Pretty cool huh? Let's see how this is done.</p> 
<span id="more-2122"></span>
<h3>First Define the Class Array</h3>
<p>The bit of code below should NOT be inside your WordPress loop, rather right before it.</p>

<pre class="brush: php; title: ; notranslate">
&lt;?php 
    // let's setup some classes first for us to style
    $style_classes = array('dloccBox1','dloccBox2','dloccBox3');
    $style_index = 0;
?&gt;
</pre>


<h3>Next Echo the Classes</h3>
<p>Now that we have our array setup it's time to output the class names into the loop</p>

<pre class="brush: php; title: ; notranslate">
&lt;?php query_posts('category_name=portfolio&amp;order=asc&amp;nopaging=true'); ?&gt;
	&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
              &lt;div class=&quot;&lt;?php $k = $style_index%3; echo &quot;$style_classes[$k]&quot;; $style_index++ ?&gt;&quot;&gt;
                   &lt;?php the_content(); ?&gt;
              &lt;/div&gt;
       &lt;?php endwhile; else: ?&gt;
&lt;?php endif; ?&gt;
</pre>

<p>On the third line notice how we are using this bit of code to output a class name and then cycle to the next item in the array?  Now you are free to style as you wish!  Of course, make sure you test with Firebug that the classes are outputting as you want.  Let me know if you have any question by commenting below!</p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/wordpress-alternating-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modern Web Font Options for Web Designers</title>
		<link>http://www.dlocc.com/articles/modern-web-font-options-for-web-designers/</link>
		<comments>http://www.dlocc.com/articles/modern-web-font-options-for-web-designers/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 02:18:59 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[Graphic Design]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cufon]]></category>
		<category><![CDATA[Google Font API]]></category>
		<category><![CDATA[sIFR]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=1963</guid>
		<description><![CDATA[Google's new Font API, Cufon, @font-face, sIFR, FLIR...?! It's 2010 and the Internet has long since evolved to become an integral part of modern society. As web designers, our web fonts used to be limited to a small number of 'safe' font-families. Today there are a number of options that allow web developers to break [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Google's new Font API, Cufon, @font-face, sIFR, FLIR...?! </strong> It's 2010 and the Internet has long since evolved to become an integral part of modern society.  As web designers, our <em>web fonts <strong>used to be limited</strong></em> to a small number of 'safe' font-families.  Today there are a number of options that allow web developers to break free from the confines of the limited 'web-safe' font spectrum and express themselves, and their websites, more individually with unique fonts.  Let's examine how the web's top font solutions work and how they are implemented.</p>
<span id="more-1963"></span>
<p>Let's start off by saying that the word(s) 'web safe/websafe' will hopefully one day become extinct.  That being said, there are many issues surrounding web fonts such as font licensing issues, browser compatibility and so on.  As well, it can be tricky to navigate the various solutions out there and to decide on the one that's right for you.  The aim of this article is to help you decide which solution is right and for you to be confident in that decision.  Let's dive right in to examine what the Internet has to offer web designers seeking an alternative to the normal CSS font-families.</p>
<h2>Google Font API / Google Font Directory</h2>
<p>We begin with Google's Font API since it's the newest and freshest web font solution out there.  This latest freebie from Google is like a free version of <a href="http://typekit.com" title="TypeKit">TypeKit</a> without the huge font selection.  I heard that they worked together on the project... who would turn down working with Google on a project?  Not TypeKit. 
<h3>Implementing Google Fonts</h3>
<p>To begin using the Google Font Directory all you have to do to use click here to go to <a title="Google Font Directory" href="http://code.google.com/webfonts"><strong>Google Font Directory</strong></a>, click on font you like from the list and copy-and-paste the appropriate code like this:</p>
<p><strong>For Lobster Font Family: </strong> Put this code in the this head of your website to get the font from Googleapis
<pre class="brush: plain; title: ; notranslate">
&lt;link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'&gt;
</pre></p>
<p class="foo">It's a snap to use the Google Font API...</p>
<p>The Google Font API will do everything for you.  All you have to do is put the font family on a CSS selector like so:
<pre class="brush: css; title: ; notranslate">
.foo { font-family: 'Lobster', arial, serif; }
</pre></p>
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<style>.foo { font-family: 'Lobster', arial, serif; font-size: 26px; color:#666;}</style>
<p>As you can see this is catching the attention of many web designers out there, including me.  I've already started to use this on my website and I imagine that we'll be seeing this on a lot more WordPress blogs to begin with and eventually higher page-ranked sites.</p>
<h3>Similar to Google Font Directory</h3>
<p><a href="http://typekit.com"><strong>TypeKit</strong></a> and <a href="http://fontdeck.com/"><strong>FontDeck</strong></a> are similar font Libraries, but without the Google Font API. The CSS3 rule @font-face is very close to the same principle.</p>
<h3>Why You Should Use Google's Font API</h3>
<ol>
   	<li>Save the bandwidth on your site.  Visitors won't be downloading the font from your server.</li>
         <li>If the same font is used across multiple sites it will </li>
        <li>Google is fast, very fast</li>
</ol>
<h3>Why You Shouldn't Use Google's Font API</h3>
<ol>
<li>There's only around 20 fonts to choose from</li>
</ol>
<h2>Cufon</h2>
<p>Cufon is a font replacement solution that aims to be the alternative to sIFR.  Their is no Flash or plug-in involved here, only natively supported features. 
<h3>Implementing Cufon</h3>
<p>To use this solution select a font file that you'd like to use (.TTF, .OTF etc.) and head over to the <a href="http://cufon.shoqolate.com/generate/" title="Cufon Font Generator">Cufon Font Generator</a>.</p>

<p>Once you get to the font generator page complete all the mumbo jumbo on there, the form itself is a bit confusing to understand at first I must admit.  Assuming you filled out the font generator form properly it'll spit out a javascript file with the name of your font and some numbers (I believe this is your font weight).  Save these files and upload them to your web server. If you have trouble with the form there's a <a href="http://groups.google.com/group/cufon">Google Cufon group</a> you can check out for help.</p>

<p>Now it's time to replace the text you want using cufon.  Copy-and-paste the following into the head of your document but replace the script source to point to the location you uploaded the files the font generator generated.

<pre class="brush: plain; title: ; notranslate">
<script src='cufon-yui.js' type='text/javascript'></script>
	<script src='Vegur_300.font.js' type='text/javascript'></script>
	<script type='text/javascript'>
		Cufon.replace('h1');
</script>
</pre>

What this code is doing is replacing the H1 text on your website.  as you can see through the JavaScript function.  You can use multiple fonts and styles on your site, which is cool but also trickier to implement and in my experience more unreliable cross-browser. </p>

<p>Cufon does have it's use on the Internet, but it's more of a niche than poised to overtake any of the upcoming font library solutions.  It does allow you to use any font you wish as long as it's in the common formats, but this also opens the door for lawsuits for businesses and organizations.  Cufon is cool though, impress your friends and use it on one of your next projects.</p>

<p><strong>Here's a good video that demonstrates implement cufon:</strong><br  /><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/uPQ4TlXatVU&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/uPQ4TlXatVU&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>

<p><strong>Example of markup rendered using Cufon:</strong>

<pre class="brush: plain; title: ; notranslate">
&lt;span style=&quot;width: 68px; height: 18px;&quot; class=&quot;cufon cufon-canvas&quot;&gt;&lt;canvas style=&quot;width: 83px; height: 19px; top: 0px; left: -1px;&quot; height=&quot;19&quot; width=&quot;83&quot;&gt;&lt;/canvas&gt;&lt;span class=&quot;cufon-alt&quot;&gt;Browse &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;width: 28px; height: 18px;&quot; class=&quot;cufon cufon-canvas&quot;&gt;&lt;canvas style=&quot;width: 43px; height: 19px; top: 0px; left: -1px;&quot; height=&quot;19&quot; width=&quot;43&quot;&gt;&lt;/canvas&gt;&lt;span class=&quot;cufon-alt&quot;&gt;by &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;width: 84px; height: 18px;&quot; class=&quot;cufon cufon-canvas&quot;&gt;&lt;canvas style=&quot;width: 93px; height: 19px; top: 0px; left: -1px;&quot; height=&quot;19&quot; width=&quot;93&quot;&gt;&lt;/canvas&gt;&lt;span class=&quot;cufon-alt&quot;&gt;Category&lt;/span&gt;&lt;/span&gt;
</pre>

All this to only say "Browse by Category"? You'd definitely only want to use this for headings. </p>
<h3>Why You Should Use Cufon</h3>
<ol>
<li>Use and font you want (not sure how legal this is...)</li>
<li>Supported by all major browsers</li>
<li>Support an open source solution</li>
</ol>
<h3>Why You Shouldn't Use Cufon</h3>
<ol>
<li>The text is not selectable</li>
<li>The font variations show up differently cross-browser</li>
<li>It makes your markup looks all crazy with a bunch of spans and inline styles</li>
<li>Not as simple to implement</li>
<li>Cannot use for body text</li>
</ol>
<h2>@font-face</h2>
<p>@font-face is a CSS3 rule that allows you to host fonts on your server and have them rendered via your website if the site visitor does not already have that font installed on their computer.  Currently, browser that support the rule are Safari, Firefox, and Google Chrome.  IE kinda supports it.  So what's the problem? Font licenses... basically money.  Many font artists don't want to see their fonts used without bring them in some money, which is completely understandable.</p>
<h3>Implementing font-face</h3>
<p>Using @font-face is nearly as easy as using the Google Font Library except you have to host the font file on your web server. To use the web font you wish you will need to declare each font family using the @font-face CSS3 rule.  For example, you would put the following in your stylesheet:</p>

<pre class="brush: css; title: ; notranslate">
@font-face {
	font-family: Delicious;
	src: url('Delicious-Roman.otf');
}

@font-face {
	font-family: Delicious;
	font-weight: bold;
	src: url('Delicious-Bold.otf');
}
</pre>

<p>Then use the font-family via CSS on your chosen elements:</p>

<pre class="brush: css; title: ; notranslate">
h3 { font-family: Delicious, sans-serif; }
</pre>

<h3>Why You Should Use @font-face</h3>
<ol>
<li>Cutting-edge CSS</li>
<li>Use any font you wish</li>
<li>Easy to implement</li>
<li>Selectable Text</li>
</ol>
<h3>Why You Shouldn't Use @font-face</h3>
<ol>
<li>Not fully cross-browser compliant</li>
<li>Font licensing issues</li>
</ol>
<h2>sIFR</h2>
<p>sIFR is a is a web font solution that replaces your text elements with Flash equivalents. I've never implemented or had a need to use sIFR personally, but I have done work on a few websites that had this solution already in the works.  I believe this solution will be used less frequently in the future since there seems to be a movement away from Flash.  Despite this, the solution is still widely used; here's brief overview of how to implement sIFR:</p>
<h3>Implementing sIFR</h3>
<p>To begin, make sure you have Adobe Flash.  You will need to modify the sifr.fla file and there's no way to do this other than Flash.  You can download a trial from Adobe if you don't have it that is good for 30-days.  Also, you should have the font files you wish to use as web fonts.  Ok, have this all?  Let's look at a brief overview of what you will be doing:</p>
<ol>
	<li><a href="http://dev.novemberborn.net/sifr3/nightlies/" title="sIFR download link">Download</a> the latest sIFR files</li>
	<li>Set up the Flash file for the desired typeface</li>
	<li>Upload the necessary files</li>
	<li>replace the desired text with the 'sIFR' text</li>
	<li>styling the new text</li>
</ol>
<p>Obviously this is a very brief overview.  Here's a <a href="http://v4.designintellection.com/this-is-how-you-get-sifr-to-work/" title="This is how to get sIFR to work">good tutorial</a> that will walk you through implementing sIFR that is more in depth than my brief rundown.</p>
<h3>Why You Should Use sIFR</h3>
<ol>
<li>Selectable Text</li>
<li>Use any font you want</li>
</ol>
<h3>Why You Shouldn't Use sIFR</h3>
<ol>
<li>Flash elements throughout your site</li>
<li>Font licensing issues</li>
<li>Not as light-weight</li>
<li>Not as easy to implement</li>
<li>Need Flash to implement</li>
</ol>
<h2>FLIR</h2>
<p>FLIR (<strong>Facelift Image Replacement</strong>) is a font solution billed as the alternative to sIFR, but I would compare it more to Cufon.  This means no flash at all.  FLIR works with JavaScript, PHP and CSS to create a unique web font solution.</p>
<h3>Implementing FLIR</h3>
<p>To get FLIR up-and-running on your website you will have to do a bit of file configuration and the uploading files to your web server.  Not too bad, but still not as snip snap as some of the previous solutions.  Let's look at the overview:</p>
<ol>
<li><a href="http://facelift.mawhorter.net/download/" title="Download FLIR">Download</a> the FLIR files</li>
<li>Configure the config-flir.php file to define the fonts</li>
<li>Add to the website by uploading the files and calling the path in you website header</li>
<li>Style the tags via the special <strong>FLIR.replace();</strong> CSS attribute</li>
</ol>
<p>For more FLIR implementation information check out: <a title="FLIR" href="http://css-tricks.com/video-screencasts/54-introduction-to-flir/">Introduction to FLIR</a> and <a title="How to use any font you wish with FLIR" href="http://net.tutsplus.com/tutorials/php/how-to-use-any-font-you-wish-with-flir/">How to Use Any Font You Wish With FLIR</a>.</p>
<h3>Why You Should Use FLIR</h3>
<ol>
<li>Easier than sIFR to implement</li>
<li>Use any font you wish</li>
</ol>
<h3>Why You Shouldn't Use FLIR</h3>
<ol>
<li>Non-selectable text</li>
<li>'Unclean' markup similar to Cufon</li>
<li>Right-click reveals the text is an image</li>
</ol>
<h2>Final Thoughts</h2>
<p>After exploring a few of the popular web font solutions in use today I feel confident that the web will eventually move the way of web fonts for mostly headings and other similar elements.  For actual content text it should be best practice to use a readable font-family that is native to all browser.  This limits your problems and allows your users to view your site's content much more easily. </p>  
<p>If you are having trouble implementing any of the above solution please feel free to leave a comment below or shoot me an email.  Also, don't forget to become a fan of DLOCC on Facebook or liking this article!  Thanks for all the support and have a good time making the web more typographically beautiful!</p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/modern-web-font-options-for-web-designers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Link separators for wp_list_pages() code snippet</title>
		<link>http://www.dlocc.com/articles/link-separators-for-wp_list_pages-code-snippet/</link>
		<comments>http://www.dlocc.com/articles/link-separators-for-wp_list_pages-code-snippet/#comments</comments>
		<pubDate>Fri, 28 May 2010 19:30:04 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=2080</guid>
		<description><![CDATA[WordPress makes it very easy to dynamically create menus from pages and categories with the use of the function wp_list_pages() and wp_list_cats()... but what if you want to have separators in your menus? Here's a bit of code that will do just that: wp_list_pages Separators Please note: I got this code from Rares Comes (very [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress makes it very easy to dynamically create menus from pages and categories with the use of the function wp_list_pages() and wp_list_cats()... but what if you want to have separators in your menus?  Here's a bit of code that will do just that:</p>

<h3>wp_list_pages Separators</h3>


<pre class="brush: php; title: ; notranslate">
$args = array(
  'sort_column' =&gt; 'menu_order',
  'title_li' =&gt; '',
  'depth' =&gt; '1',
  'echo' =&gt; 0
);
$separator = ' | ';
$pattern = '/(&lt;\\/a&gt;).*?(&lt;\\/li&gt;).*?(&lt;li)/is';
$replace = '&lt;/a&gt;' . $separator . '&lt;/li&gt;&lt;li';
$subnav = preg_replace($pattern,$replace,wp_list_pages($args));
echo $subnav;
</pre>


<p>Please note: I got this code from <a href="http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/" title="Rares Comes WordPress separators">Rares Comes</a> (very nice lavalamp menu there)</p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/link-separators-for-wp_list_pages-code-snippet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress List Subpages Even if On Subpage</title>
		<link>http://www.dlocc.com/articles/wordpress-list-subpages-even-if-on-subpage/</link>
		<comments>http://www.dlocc.com/articles/wordpress-list-subpages-even-if-on-subpage/#comments</comments>
		<pubDate>Tue, 25 May 2010 17:49:59 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=2076</guid>
		<description><![CDATA[I'm building a new site and the navigation on it requires me to use a different bit of code for parent and child pages. I thought I'd share the code for those out there building a similar navigation. Here's a handy bit of code that you can use to display all subpages on a subpage. [...]]]></description>
			<content:encoded><![CDATA[<p>I'm building a new site and the navigation on it requires me to use a different bit of code for parent and child pages.  I thought I'd share the code for those out there building a similar navigation.  Here's a handy bit of code that you can use to display all subpages on a subpage.  For instance, you have your pages setup like so:</p>

<p>Page: Fruit<br  />
subpage: Banana<br  />
subpage: Apply<br  />
subpage: Orange</p>

<h3>On Parent Page</h3>
<p>If you were wanting to show a navigation menu of all subpages in the Fruit category you could use the following bit of code:</p>

<pre class="brush: php; title: ; notranslate">
&lt;?php
  $children = wp_list_pages('title_li=&amp;child_of='.$post-&gt;ID.'&amp;echo=0');
  if ($children) { ?&gt;
  &lt;ul id=&quot;mainNav&quot;&gt;
	&lt;div id=&quot;locationsNavHead&quot;&gt;choose a product&lt;/div&gt;
  &lt;?php echo $children; ?&gt;
  &lt;/ul&gt;
&lt;?php } ?&gt;
</pre>


<h3>On Subpages</h3>
<p>For child, or subpages, we could use the following bit of code:</p>

<pre class="brush: php; title: ; notranslate">
&lt;div id=&quot;sidebar&quot;&gt;
&lt;?php
//list subpages even if on a subpage
  if($post-&gt;post_parent)
  $children = wp_list_pages(&quot;title_li=&amp;child_of=&quot;.$post-&gt;post_parent.&quot;&amp;echo=0&quot;);
  else
  $children = wp_list_pages(&quot;title_li=&amp;child_of=&quot;.$post-&gt;ID.&quot;&amp;echo=0&quot;);
  if ($children) { ?&gt;
  &lt;ul id=&quot;mainNav&quot;&gt;
  &lt;div id=&quot;locationsNavHead&quot;&gt;choose a product&lt;/div&gt;
  &lt;?php echo $children; ?&gt;
  &lt;/ul&gt;
&lt;?php } ?&gt;
&lt;/div&gt;
</pre>


<p>If you are confused at what this all means please comment below and check out <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages" title="wp_list_pages()">wp_list_pages() over at the WordPress Codex</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/wordpress-list-subpages-even-if-on-subpage/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Unveils the Google Font Directory and API</title>
		<link>http://www.dlocc.com/articles/google-unveils-the-google-font-directory-api/</link>
		<comments>http://www.dlocc.com/articles/google-unveils-the-google-font-directory-api/#comments</comments>
		<pubDate>Thu, 20 May 2010 02:30:29 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=1978</guid>
		<description><![CDATA[Google is looking to help all of us web and graphic designers out there who have been trying to break free of the CSS font-family limitations. How are they doing this? Today Google released the Google Font Directory and Google Font API in attempts to bring a selectable and dynamic font solution to the web. [...]]]></description>
			<content:encoded><![CDATA[<p>Google is looking to help all of us web and graphic designers out there who have been trying to break free of the CSS font-family limitations.  How are they doing this?  <strong>Today Google released</strong> the <a href="http://code.google.com/webfonts">Google Font Directory</a> and <a title="Google Font API" href="http://code.google.com/apis/webfonts/">Google Font API</a> in attempts to bring a selectable and dynamic font solution to the web.  I'm expecting the directory in the future this solution will grow to become the web's leading robust and scalable font library and API.</p>
<p>The good things about this web font solution is that it is very easy to implement and the text is completely selectable (for copy-and-paste purposes).  The downsides (both will eventually become irrelevant) are that not every browser will support it... mostly the old school ones that no one should care about anymore, and that it in it's current state the Google Font Directory is limited to a about 20+ fonts (of which you'd probably use about 10).  As the web continues to evolve both of these 'downsides' will no longer be relevant.   </p>
<p id="fooholder"><span class="foo">Google Web Fonts</span><br  /><span class="foo2">Using the Google Font API and Directory</span></p>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine"> 
<link href='http://fonts.googleapis.com/css?family=Molengo' rel='stylesheet' type='text/css'>
<style>
#fooholder {
padding:10px; background-color: #EBEFF9; text-align:center;
}
      .foo {
        font-family: 'Tangerine', serif; 
        font-size: 48px; line-height: 1em;
      }
      .foo2 {
     font-family: 'Molengo', arial, serif; font-size: 20px; font-weight: bold; line-height: 1em;
   }
</style>
<span id="more-1978"></span>
<h2>Google's Font API<img class="alignright size-full wp-image-1987" title="google-font-api-logo" src="http://www.dlocc.com/articles/wp-content/uploads/2010/05/google-font-api-logo.gif" alt="Google Font API Logo" width="196" height="40" style="padding-right:20px;" /></h2>
<p>Google's font API is a part of Google Labs and is an easy to use application programmable interface (API) that allows you to select a font from Google's font directory and use it on any website of your choosing... for free!  Applying a font from Google's Font Directory is a breeze, simply add a stylesheet link to your site's head and then use the font you selected from the directory in a CSS style.  Bingo, bango, bongo.</p>
<h3>Usage and Implementation</h3>
<p>Here's a Google Font usage example:</p>

<p>First add our stylesheet to the head of your website.</p>

<pre class="brush: plain; title: ; notranslate">
  &lt;head&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://fonts.googleapis.com/css?family=Tangerine&quot;&gt; 
  &lt;/head&gt;
</pre>

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine">
<p>Next, let's apply the font we chose from the Google Font Directory it to a class on our site!  We can do this in our master CSS stylesheet or in your head also (I'd recommend keeping your styles in the mastersheet).</p>

<pre class="brush: plain; title: ; notranslate">
  &lt;head&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://fonts.googleapis.com/css?family=Tangerine&quot;&gt; 
    &lt;style&gt;
      .foo {
        font-family: 'Tangerine', serif;
        font-size: 48px;
      }
  &lt;/style&gt;
&lt;/head&gt;
</pre>

<p>Now with this implemented properly using the quick example shown above you will see some sweet Google font below this paragraph that's selectable and easy to implement.</p>
<p class="foo" style="margin-top:20px;line-height:1em;">Check me out!  This text is selectable and super easy to implement.  Thanks Google!</p>

<h3>Still Confused? One More Time</h3>
<p>Often times, things explained the first time don't make sense.  If you're still confused here's the jist</p>
<p><b>Step 1</b>: Add a stylesheet link requesting the fonts from Google to your website (preferably in the head).</p>

<pre class="brush: plain; title: ; notranslate">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://fonts.googleapis.com/css?family=Font+Name&quot;&gt;
</pre>

<p><b>Step 2</b>: Style an element with the font you just requested in step 1.  By element I mean any CSS class or ID.</p>

<pre class="brush: css; title: ; notranslate">
CSS selector {
  font-family: 'Font Name', serif;
}
</pre>

<p><b>Step 3</b>: There is no step 3! Just repeat step 2 by styling elements you have already on your website.</p>
<img class="alignnone size-full wp-image-1986" title="google-font-directory-logo" src="http://www.dlocc.com/articles/wp-content/uploads/2010/05/google-font-directory-logo.gif" alt="Google Font Directory Logo" width="264" height="40" />
<h2>Google's Font Directory</h2>
<p>Google's font directory, though still in beta and limited to about 20+ fonts, is going to be widely adopted by web designers in the near future.  Why?  Because Google has made a very intuitive, free, and simple to implement solution.  The fonts are free to use on any commercial and non-commercial web projects.</p>
<ul>

</ul>
<h2>Comparable Web Font Solutions</h2>
Google isn't the first to come out with an entirely open source font library.  Typekit and Fontdeck are doing the same thing: providing their users with a library of fonts that can be embedded on their websites.  The difference is these companies don't have the muscle of Google, are many times more difficult to implement, and may cost money (not open source).
<h3>Google Font Solution Final Thoughts</h3>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/google-unveils-the-google-font-directory-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: If URL is Homepage then do this&#8230;</title>
		<link>http://www.dlocc.com/articles/wordpress-if-url-is-homepage-then-do-this/</link>
		<comments>http://www.dlocc.com/articles/wordpress-if-url-is-homepage-then-do-this/#comments</comments>
		<pubDate>Wed, 19 May 2010 22:38:01 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=1957</guid>
		<description><![CDATA[Question: In WordPress how to I make sure the page loaded is the homepage URL and display some data if the standard WordPress Conditional Tags are not working for my theme?! Answer: Here's a quick snippet of code that will give you an option to do something if these WordPress basic conditional tags are not [...]]]></description>
			<content:encoded><![CDATA[<p><b>Question:</b> In WordPress how to I make sure the page loaded is the homepage URL and display some data if the standard WordPress Conditional Tags are not working for my theme?!</p>

<p><b>Answer:</b> Here's a quick snippet of code that will give you an option to do something if these WordPress basic conditional tags are not working in whatever theme you are coding.  Before we go any further I want to make sure that you have already tried to use the much simpler <a href="http://codex.wordpress.org/Conditional_Tags" title="WordPress Conditional Tags">WordPress Conditional tags</a> rather than using the method below.</p>

<p>I found this bit of code to be useful in the past when the handy WordPress conditional tags didn't work as intended and I needed another way to perform the same function.  Hope you enjoy and please comment if you have any trouble with the code.</p>


<pre class="brush: php; title: ; notranslate">
&lt;?php
   // DLOCC If URL is Homepage then do this...
        $homepage = &quot;/&quot;;
        $currentpage = $_SERVER['REQUEST_URI'];
        if($homepage==$currentpage):
    ?&gt;
&lt;div&gt;&lt;p&gt;My Info on Homepage&lt;/p&gt;&lt;/div&gt;
&lt;?php else: ?&gt;
&lt;?php endif; ?&gt;
</pre>


<h3>What this Conditional Statement Does</h3>
<ol>
<li>sets the homepage variable as the url root</li>
<li>checks the current url in the browser and sets that as the current page variable</li>
<li>sets the conditional if the two variables are the same value then do something</li>
<ol>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/wordpress-if-url-is-homepage-then-do-this/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WordPress Loop: If Parent or Child of Page or Category</title>
		<link>http://www.dlocc.com/articles/wordpress-loop-if-parent-or-child-of-category-or-page/</link>
		<comments>http://www.dlocc.com/articles/wordpress-loop-if-parent-or-child-of-category-or-page/#comments</comments>
		<pubDate>Wed, 19 May 2010 04:41:42 +0000</pubDate>
		<dc:creator>Devin Walker</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.dlocc.com/articles/?p=1936</guid>
		<description><![CDATA[The WordPress loop is extremely useful when developing customized WordPress solutions. One bit of code I've had to use often is one that will display a set of code if the page or post is a parent of child of a certain category. This is an easy way to display, output, or show data on [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://codex.wordpress.org/The_Loop" title="WordPress Loop">WordPress loop</a> is extremely useful when developing customized WordPress solutions.  One bit of code I've had to use often is one that will display a set of code if the page or post is a parent of child of a certain category.  This is an easy way to display, output, or show data on all of your WordPress pages that are a parent or child of a specific category.</p>
<span id="more-1936"></span>
<h2>What the Code Looks Like</h2>
<p>If you are familiar with PHP and the <a href="http://codex.wordpress.org/Main_Page" title="Link to the WordPress Codex">WordPress Codex</a> then you'll know that typically you could use conditional tags to detect the page in a conditional statement.  This code is separate from the WordPress codex and is just pure server side PHP goodness.</p>

<h3>Display Info on Parent and Child Pages</h3>

<p>Here's an example of a WordPress Conditional Statement that displays any relevant information if the particular page is named "Foo" and the category is 420.</p>
<pre class="brush: php; title: ; notranslate">
&amp;lt;?php if(is_page('Foo') || $post-&amp;gt;post_parent == '420' ) : ?&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
</pre>

<p><b>Used inside the WordPress Loop</b></p>

<pre class="brush: php; title: ; notranslate">

&amp;lt;?php if(is_page('Foo') || $post-&amp;gt;post_parent == '420' ) : ?&amp;gt; 
//here we start the conditional statement
&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;
//here we start the wordpress loop 
&amp;lt;a href=&amp;quot;&amp;lt;?php the_permalink(); ?&amp;gt;&amp;quot; rel=&amp;quot;bookmark&amp;quot; title=&amp;quot;Permanent Link to &amp;lt;?php the_title(); ?&amp;gt;&amp;quot;&amp;gt;&amp;lt;?php the_title(); ?&amp;gt;&amp;lt;/a&amp;gt;	
//this grabs all post titles and links                        	 
&amp;lt;?php endwhile; else: ?&amp;gt;       
&amp;lt;?php endif; ?&amp;gt;
 //end wordpress loop
&amp;lt;?php else: ?&amp;gt;
//do something else (not necessay but useful)
&amp;lt;?php endif; ?&amp;gt;
 //end if 
</pre>
[/inline]

<p>The above example is a bit more complex but makes great use for showing the information you want, where you want on your <strong>WordPress site</strong>.</p>

<h3>Display Info on Parent and Child a WordPress Category</h3>
<p>The first examples written above dealt with WordPress pages.  Now let's show how do display some data using the WordPress conditional tag <strong>in_category()</strong>
<p><strong>If Post is in Category</strong></p>
<p>This time around we make use of the in_category() <a href="http://codex.wordpress.org/Conditional_Tags" title="WordPress Conditional Tags">conditional tag</a>.  In this example some data will show if the category is Foo.</p>

<pre class="brush: php; title: ; notranslate">
&amp;lt;?php if(in_category('Foo')): ?&amp;gt;
// my data
&amp;lt;?php endif; ?&amp;gt;
</pre>


<p><strong>If Post is in Category do WordPress Loop</strong></p>
<p>Here we want to display data through the wordpress loop if in a category</p>

<pre class="brush: php; title: ; notranslate">
&amp;lt;?php if(in_category('Foo')): ?&amp;gt;
&amp;lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&amp;gt;// my data
&amp;lt;?php endwhile; else: ?&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
&amp;lt;?php endif; ?&amp;gt;
</pre>


<h2>Summary</h2>
<p>Using the examples above you can create cool customized sidebars and display information across your website in a more dynamic way.  Please let me know if you have any problems by using the contact form below!</p>]]></content:encoded>
			<wfw:commentRss>http://www.dlocc.com/articles/wordpress-loop-if-parent-or-child-of-category-or-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

