<?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>adventures of a blogjunkieWordPress » adventures of a blogjunkie</title>
	<atom:link href="http://blogjunkie.net/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://blogjunkie.net</link>
	<description>thoughts and ramblings of David Wang</description>
	<lastBuildDate>Wed, 02 May 2012 08:48:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress Online Business Giveaway</title>
		<link>http://blogjunkie.net/2012/02/wp-pro-business-giveaway</link>
		<comments>http://blogjunkie.net/2012/02/wp-pro-business-giveaway#comments</comments>
		<pubDate>Sat, 25 Feb 2012 11:21:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[promotions]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=3035</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a></p>The folks over at WP Pro Business are running an insane giveaway of WordPress-based online business products. Some of the stuff up for grabs include.. Gravity Forms licenses WPMUDEV Memberships BackupBuddy licences Wishlist Member licenses Standard Theme Marketeer Theme and more! The total value of the giveaway is over $9,000! Like I said &#8211; insane....
Related posts:<ol>
<li><a href='http://blogjunkie.net/2011/12/flexiroam-christmas-giveaway' rel='bookmark' title='Win FlexiRoam roaming passes (and more) with @blogjunkie&#8217;s Christmas giveaway'>Win FlexiRoam roaming passes (and more) with @blogjunkie&#8217;s Christmas giveaway</a></li>
<li><a href='http://blogjunkie.net/2009/12/freelanceshow-holiday-giveaway' rel='bookmark' title='FreelanceShow holiday giveaway'>FreelanceShow holiday giveaway</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a></p><p><img class="alignnone size-large wp-image-3036" title="wpprobusiness-giveaway" src="http://blogjunkie.net/files/2012/02/wpprobusiness-giveaway-500x145.png" alt="" width="500" height="145" /></p>
<p>The folks over at WP Pro Business are running an insane giveaway of WordPress-based online business products. Some of the stuff up for grabs include..</p>
<p>Gravity Forms licenses<br />
WPMUDEV Memberships<br />
BackupBuddy licences<br />
Wishlist Member licenses<br />
Standard Theme<br />
Marketeer Theme</p>
<p>and more! The total value of the giveaway is over $9,000! Like I said &#8211; insane.</p>
<p>Head on over and <a href="http://wpprobusiness.com/wpgiveaway/">enter the giveaway now</a>.</p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2011/12/flexiroam-christmas-giveaway' rel='bookmark' title='Win FlexiRoam roaming passes (and more) with @blogjunkie&#8217;s Christmas giveaway'>Win FlexiRoam roaming passes (and more) with @blogjunkie&#8217;s Christmas giveaway</a></li>
<li><a href='http://blogjunkie.net/2009/12/freelanceshow-holiday-giveaway' rel='bookmark' title='FreelanceShow holiday giveaway'>FreelanceShow holiday giveaway</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2012/02/wp-pro-business-giveaway/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Published] Take 5 Minutes to Make WordPress 10 Times More Secure</title>
		<link>http://blogjunkie.net/2011/08/5-minute-wordpress-security</link>
		<comments>http://blogjunkie.net/2011/08/5-minute-wordpress-security#comments</comments>
		<pubDate>Thu, 11 Aug 2011 14:59:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[In the Spotlight]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2806</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://www.problogger.net/archives/2011/08/11/take-5-minutes-to-make-wordpress-10-times-more-secure/" rel="bookmark" title="[Published] Take 5 Minutes to Make WordPress 10 Times More Secure" target="_blank">http://www.problogger.net/archives/2011/08/11/take-5-minutes-to-make-wordpress-10-times-more-secure/</a></p>ProBlogger.net published my guest post today. Guess that officially makes me a professional blogger Related posts: How to make WordPress bulletproof for clients Can you drastically change how WordPress looks in 10 minutes? The Headway theme can! Create a WordPress tumblog with Headway and WooTumblog
Related posts:<ol>
<li><a href='http://blogjunkie.net/2011/05/bulletproof-wordpress-for-clients' rel='bookmark' title='How to make WordPress bulletproof for clients'>How to make WordPress bulletproof for clients</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog' rel='bookmark' title='Create a WordPress tumblog with Headway and WooTumblog'>Create a WordPress tumblog with Headway and WooTumblog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://www.problogger.net/archives/2011/08/11/take-5-minutes-to-make-wordpress-10-times-more-secure/" rel="bookmark" title="[Published] Take 5 Minutes to Make WordPress 10 Times More Secure" target="_blank">http://www.problogger.net/archives/2011/08/11/take-5-minutes-to-make-wordpress-10-times-more-secure/</a></p><p><img class="aligncenter size-large wp-image-2807" title="Problogger guest post" src="http://blogjunkie.net/files/2011/08/Screen-Shot-2011-08-11-at-10.56.09-PM-500x385.png" alt="" width="500" height="385" /></p>
<p>ProBlogger.net published my guest post today. Guess that officially makes me a professional blogger <img src='http://blogjunkie.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2011/05/bulletproof-wordpress-for-clients' rel='bookmark' title='How to make WordPress bulletproof for clients'>How to make WordPress bulletproof for clients</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog' rel='bookmark' title='Create a WordPress tumblog with Headway and WooTumblog'>Create a WordPress tumblog with Headway and WooTumblog</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/08/5-minute-wordpress-security/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom size featured image thumbnail with fallback in WordPress</title>
		<link>http://blogjunkie.net/2011/06/custom-size-thumbnail-with-fallback</link>
		<comments>http://blogjunkie.net/2011/06/custom-size-thumbnail-with-fallback#comments</comments>
		<pubDate>Tue, 21 Jun 2011 16:25:53 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2729</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a><a href="http://blogjunkie.net/section/geek" title="Geek">Geek</a></p>Occasionally you may need to display featured images in sizes other than WordPress&#8217; default thumbnail, medium and large sizes. That&#8217;s quite easily solved with the add_image_size() and the_post_thumbnail() functions. Unfortunately, there are still 2 problems to be solved: Some posts may not have images at all, or the author forgets to attach a featured image Previous...
Related posts:<ol>
<li><a href='http://blogjunkie.net/2011/02/tineeye' rel='bookmark' title='WTOTW: Find out where an image came from with TinEye'>WTOTW: Find out where an image came from with TinEye</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2010/05/wordcampmy-theme-frameworks' rel='bookmark' title='Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]'>Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a><a href="http://blogjunkie.net/section/geek" title="Geek">Geek</a></p><p>Occasionally you may need to display featured images in sizes other than WordPress&#8217; default thumbnail, medium and large sizes. That&#8217;s quite easily solved with the <code>add_image_size()</code> and <code>the_post_thumbnail()</code> functions. Unfortunately, there are still 2 problems to be solved:</p>
<ul>
<li>Some posts may not have images at all, or the author forgets to attach a featured image</li>
<li>Previous posts don&#8217;t have featured images</li>
</ul>
<p>Here&#8217;s a solution that 1) resizes the featured image to the right size, 2) uses the first image in the post if a featured image is not set and 3) falls back to a default image if none of the above are true.<span id="more-2729"></span></p>
<h3>TimThumb</h3>
<p>TimThumb is a popular script that crops and resizes images and then caches them that is used in many WordPress themes. <a href="http://code.google.com/p/timthumb/">Download the script</a> from the project page and save it as <code>timthumb.php</code> in your <code>wp-content</code> folder.</p>
<p>The script&#8217;s purpose is to resize images that are not hosted on your website, and therefore unable to be resized by WordPress. By default it only resizes external images from a few &#8216;safe&#8217; sources, e.g. flickr.com, but you can override that by setting define <code>('ALLOW_EXTERNAL', TRUE);</code> in the script. Please read up on the <a href="http://www.binarymoon.co.uk/projects/timthumb/">TimThumb documentation</a>.</p>
<h3>Theme customization</h3>
<p><strong>functions.php</strong></p>
<p>In your theme folder, add the following code to your <code>functions.php</code> file. If your theme doesn&#8217;t have a <code>functions.php</code> file, simply create it and save it into your theme folder.</p>
<pre class="brush: php; title: ; notranslate">
add_image_size( 'featured-thumbnail', 95, 66, true );

// Figure out which image to be shown
function featured_image_thumb() {
	global $post, $posts;
	// If a featured image has been set, use the
	// featured-thumbnail size that was set above with the
	// class of 'optional_img_class'
	if (has_post_thumbnail() ) {
		the_post_thumbnail('featured-thumbnail',
		array('class' =&gt; 'optional_img_class') );
	}
	// If a featured image is not set, get the first image in
	// the post content
	else {
		$first_img = '';
		ob_start();
		ob_end_clean();
		$output = preg_match_all('/&lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&gt;/i', $post-&gt;post_content, $matches);
		$first_img = $matches [1] [0];

		// Define a default fallback image in case a featured image
		// is not set and there are no images in the post content
		if(empty($first_img)){
			$first_img = get_bloginfo(&quot;template_url&quot;).'/images/default.jpg';
		}

		// Generate the HTML code to display the image and resize
		// the image with timthumb.php
		return '&lt;img class=&quot;optional_img_class&quot; src=&quot;'. get_bloginfo(&quot;template_url&quot;) . '/timthumb.php?src=' . $first_img .'&amp;w=95&amp;h=66&quot; alt=&quot;&quot; /&gt;';
	}
}
</pre>
<p>Code for grabbing the first image courtesy of WpRecipies.com: <a title="Permanent Link to How to: Get the first image from the post and display it" href="http://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it" rel="bookmark">How to: Get the first image from the post and display it</a></p>
<p><strong>In your theme</strong></p>
<p>Call the <code>featured_image_thumb()</code> function in your theme, e.g.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
	&lt;a class=&quot;featured-image&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php the_title_attribute(); ?&gt;&quot;&gt;
		&lt;?php echo featured_image_thumb(); ?&gt;
	&lt;/a&gt;
&lt;?php endwhile; endif; ?&gt;
</pre>
<p><strong>Don&#8217;t forget to regenerate your previously uploaded images</strong></p>
<p>The <code>add_image_size()</code> function only works on images that are uploaded from this point forward. You can force WordPress to regenerate the images again with that specific size by using the <a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a> plugin.</p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2011/02/tineeye' rel='bookmark' title='WTOTW: Find out where an image came from with TinEye'>WTOTW: Find out where an image came from with TinEye</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2010/05/wordcampmy-theme-frameworks' rel='bookmark' title='Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]'>Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/06/custom-size-thumbnail-with-fallback/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to make WordPress bulletproof for clients</title>
		<link>http://blogjunkie.net/2011/05/bulletproof-wordpress-for-clients</link>
		<comments>http://blogjunkie.net/2011/05/bulletproof-wordpress-for-clients#comments</comments>
		<pubDate>Sat, 14 May 2011 03:29:29 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[In the Spotlight]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2517</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a></p>This was the topic of the talk I presented at WordConf Asia in Kuala Lumpur, Malaysia in May 2011.
Related posts:<ol>
<li><a href='http://blogjunkie.net/2010/05/remove-headway-update-notifications' rel='bookmark' title='Remove Headway update notifications'>Remove Headway update notifications</a></li>
<li><a href='http://blogjunkie.net/2010/05/wordcampmy-theme-frameworks' rel='bookmark' title='Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]'>Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]</a></li>
<li><a href='http://blogjunkie.net/2011/03/why-jetpack-really-packs-a-punch-%e2%80%93-the-future-of-wordpress-and-why-you-may-not-like-it-much-if-you%e2%80%99re-a-premium-developer-or-service-provider' rel='bookmark' title='Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)'>Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a></p><p><object id="doc_815513667071602" name="doc_815513667071602" height="600" width="500" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;"><param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="FlashVars" value="document_id=55374144&#038;access_key=key-1mm0vlrlaqxd60yww17v&#038;page=1&#038;viewMode=slideshow"><embed id="doc_815513667071602" name="doc_815513667071602" src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=55374144&#038;access_key=key-1mm0vlrlaqxd60yww17v&#038;page=1&#038;viewMode=slideshow" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="600" width="500" wmode="opaque" bgcolor="#ffffff"></embed></object></p>
<p>This is my talk at <a href="http://wordcamp.asia">WordCon / WordCamp Asia 2011</a>. Here are the notes from my presentation &#8211; for my reference and yours. If you enjoyed my ideas here, please Like or tweet this post. Thanks!<br />
<span id="more-2517"></span></p>
<p>I&#8217;ve had the privilege of working on many WordPress projects big and small throughout my career. However in many situations I&#8217;ve realized that creating a great design and then turning it into a high-quality WordPress theme is not enough to make the project a success. WordPress developers can find themselves in this situation when</p>
<ul>
<li>the client has different expectations &#8211; the developer delivers a theme, but the client is left scratching their heads wondering, &#8220;How does this WordPress thing and a zip file going to become my website?&#8221;</li>
<li>there is little or no documentation &#8211; the developer assumes that the client can just figure it out because hey, WordPress is a piece of cake!</li>
<li>there is little or no support &#8211; what happens when the client needs help? Most freelance developers do not specify a support process for clients, which leads to frustrations on both ends.</li>
</ul>
<p>I have identified 4 approaches for developers to prevent unnecessary stress between the client and developer:</p>
<ol>
<li>Don&#8217;t use WordPress, just because you&#8217;re familiar with it and especially if the client doesn&#8217;t need a CMS.</li>
<li>Provide website updates and support as monthly subscription</li>
<li>Simplify WordPress by removing menus and unnecessary features. I&#8217;m against this because it makes WordPress into something it&#8217;s not.</li>
<li>Bulletproof WordPress (and the client-developer relationship) by implementing the strategies below.</li>
</ol>
<p><strong>Educate clients about WordPress and set expectations.</strong> Make it clear to the client that running a website is like driving a car so that they are prepared for the commitment in owning one. If they aren&#8217;t prepared, you the developer are available to provide assistance. Just like how they might send their car for a professional wash and wax, your professional help costs money too.</p>
<p><strong>Pre-empt potential problems.</strong> Anticipate stumbling blocks and nip them in the bud, e.g. feature overwhelm and auto-updates not working. Take the extra time to do these before handing over the site and developers will save time in providing support.</p>
<p><strong>Proper documentation.</strong> Again, taking the time to create the documentation for the site will save time later. Instructions hurriedly sent over via email does not constitute proper documentation. There are lots of options to create manuals, user guides and tutorials for the client. My favorite technique is to record a screencast for the client.</p>
<p><strong>Provide inline / contextual hints.</strong> Similar to the above, this strategy advocates creating documentation for the client but breaking it up  smaller pieces and displaying them only where necessary.</p>
<p><strong>Provide shortcuts for more complex functions.</strong> Finally, shortcuts are stuff that makes it easier for the client to perform a particular task, e.g. formatting text and adding images into the sidebar &#8211; difficult with the text widget, easy with the Rich Text Widget. I also like to make use of custom shortcodes in my themes.</p>
<p>In conclusion, some clients <em>really are idiots</em> but most aren&#8217;t but will still need hand-holding, support and education. Despite needing extra time and effort to bulletproof your work, it&#8217;s worth it because happier clients will lead to more business for you <img src='http://blogjunkie.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S. Dear clients who are reading this post, &#8216;idiot&#8217; is just a moniker. I don&#8217;t mean you. Really <img src='http://blogjunkie.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>If you enjoyed my presentation, please support me by purchasing the following products with my affiliate links:</p>
<ol>
<li><a href="http://getheadway.com">Headway WordPress Theme Framework</a></li>
<li><a href="http://theclickstarter.com/go/woothemes">WooThemes Premium WordPress Themes</a></li>
<li><a href="http://www.bluehost.com/track/davidwang">Bluehost web hosting</a></li>
<li><a href="http://www.site5.com/in.php?id=95694">Site5 web hosting</a></li>
</ol>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2010/05/remove-headway-update-notifications' rel='bookmark' title='Remove Headway update notifications'>Remove Headway update notifications</a></li>
<li><a href='http://blogjunkie.net/2010/05/wordcampmy-theme-frameworks' rel='bookmark' title='Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]'>Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]</a></li>
<li><a href='http://blogjunkie.net/2011/03/why-jetpack-really-packs-a-punch-%e2%80%93-the-future-of-wordpress-and-why-you-may-not-like-it-much-if-you%e2%80%99re-a-premium-developer-or-service-provider' rel='bookmark' title='Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)'>Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/05/bulletproof-wordpress-for-clients/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More robust footer widget areas for Headway</title>
		<link>http://blogjunkie.net/2011/04/headway-footer-widget-areas</link>
		<comments>http://blogjunkie.net/2011/04/headway-footer-widget-areas#comments</comments>
		<pubDate>Tue, 26 Apr 2011 03:46:25 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[headway]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2492</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p>I recently got an email from a reader who wanted to know how I implemented my footer widget areas, and seen some similar requests in the Headway forums. With Headway, you can flip your widget areas horizontally to make a widgetized footer but it works best when you only have 3-4 widgets in them. I...
Related posts:<ol>
<li><a href='http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog' rel='bookmark' title='Create a WordPress tumblog with Headway and WooTumblog'>Create a WordPress tumblog with Headway and WooTumblog</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2010/05/remove-headway-update-notifications' rel='bookmark' title='Remove Headway update notifications'>Remove Headway update notifications</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p>I recently got an email from a reader who wanted to know how I implemented my footer widget areas, and seen some similar requests in the Headway forums. With Headway, you can <a href="http://headwaythemes.com/documentation/leafs/leaf-types/widgetready-sidebar/">flip your widget areas horizontally</a> to make a widgetized footer but it works best when you only have 3-4 widgets in them. I wanted to have more flexibility and so I injected 3 widget areas into my footer.</p>
<p><div id="attachment_2494" class="wp-caption aligncenter" style="width: 510px"><a href="http://blogjunkie.net/files/2011/04/blogjunkie.net-fat-footer.jpg"><img class="size-large wp-image-2494" title="blogjunkie.net fat footer" src="http://blogjunkie.net/files/2011/04/blogjunkie.net-fat-footer-500x361.jpg" alt="" width="500" height="361" /></a><p class="wp-caption-text">Screenshot for posterity, if I ever re-design this blog. Click for full-size image.</p></div></p>
<p>I didn&#8217;t have time for a full tutorial but hopefully you&#8217;ll find these code snippets useful:</p>
<p><a href="http://pastebin.com/4CxX3BCM">blogjunkie.net custom_functions.php for Headway theme</a></p>
<p><a href="http://pastebin.com/VwTM1CUK">blogjunkie.net custom.css for fat footer widget areas</a></p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog' rel='bookmark' title='Create a WordPress tumblog with Headway and WooTumblog'>Create a WordPress tumblog with Headway and WooTumblog</a></li>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2010/05/remove-headway-update-notifications' rel='bookmark' title='Remove Headway update notifications'>Remove Headway update notifications</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/04/headway-footer-widget-areas/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)</title>
		<link>http://blogjunkie.net/2011/03/why-jetpack-really-packs-a-punch-%e2%80%93-the-future-of-wordpress-and-why-you-may-not-like-it-much-if-you%e2%80%99re-a-premium-developer-or-service-provider</link>
		<comments>http://blogjunkie.net/2011/03/why-jetpack-really-packs-a-punch-%e2%80%93-the-future-of-wordpress-and-why-you-may-not-like-it-much-if-you%e2%80%99re-a-premium-developer-or-service-provider#comments</comments>
		<pubDate>Tue, 15 Mar 2011 01:37:00 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/2011/03/why-jetpack-really-packs-a-punch-%e2%80%93-the-future-of-wordpress-and-why-you-may-not-like-it-much-if-you%e2%80%99re-a-premium-developer-or-service-provider</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://wpmu.org/why-jetpack-reallypacks-a-punch-and-the-future-of-wordpress-as-a-platform/" rel="bookmark" title="Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)" target="_blank">http://wpmu.org/why-jetpack-reallypacks-a-punch-and-the-future-of-wordpress-as-a-platform/</a></p>Last week, Automattic announced Jetpack, a bundle of plugins that will bring the hosted WordPress.com features into self-hosted WordPress blogs. On the surface it sounds like a great addition to the WordPress platform, but James from WPMU.org points out some far reaching implications. Related posts: Theme Frameworks: A Glimpse Into The Future Of WordPress Themes...
Related posts:<ol>
<li><a href='http://blogjunkie.net/2010/05/wordcampmy-theme-frameworks' rel='bookmark' title='Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]'>Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]</a></li>
<li><a href='http://blogjunkie.net/2007/05/understanding-apollo' rel='bookmark' title='Understanding Apollo'>Understanding Apollo</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://wpmu.org/why-jetpack-reallypacks-a-punch-and-the-future-of-wordpress-as-a-platform/" rel="bookmark" title="Why Jetpack really packs a punch – the future of WordPress and why you may not like it much (if you’re a premium developer or service provider)" target="_blank">http://wpmu.org/why-jetpack-reallypacks-a-punch-and-the-future-of-wordpress-as-a-platform/</a></p><p>Last week, <a href="http://jetpack.me/2011/03/09/blast-off/" title="" target="">Automattic announced Jetpack</a>, a bundle of plugins that will bring the hosted WordPress.com features into self-hosted WordPress blogs. On the surface it sounds like a great addition to the WordPress platform, but James from WPMU.org points out some far reaching implications.</p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2010/05/wordcampmy-theme-frameworks' rel='bookmark' title='Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]'>Theme Frameworks: A Glimpse Into The Future Of WordPress Themes [WordCamp Malaysia Presentation]</a></li>
<li><a href='http://blogjunkie.net/2007/05/understanding-apollo' rel='bookmark' title='Understanding Apollo'>Understanding Apollo</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/03/why-jetpack-really-packs-a-punch-%e2%80%93-the-future-of-wordpress-and-why-you-may-not-like-it-much-if-you%e2%80%99re-a-premium-developer-or-service-provider/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create your own Twitpic-like site</title>
		<link>http://blogjunkie.net/2011/01/how-to-create-your-own-twitpic-like-site</link>
		<comments>http://blogjunkie.net/2011/01/how-to-create-your-own-twitpic-like-site#comments</comments>
		<pubDate>Sat, 29 Jan 2011 11:18:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2312</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://xes.cx/?p=4800" rel="bookmark" title="How to create your own Twitpic-like site" target="_blank">http://xes.cx/?p=4800</a></p>@xescx explains a useful tip on how to roll your own Twitpic service with WordPress. Related posts: Create a WordPress tumblog with Headway and WooTumblog KDDI US
Related posts:<ol>
<li><a href='http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog' rel='bookmark' title='Create a WordPress tumblog with Headway and WooTumblog'>Create a WordPress tumblog with Headway and WooTumblog</a></li>
<li><a href='http://blogjunkie.net/2007/04/kddi-us' rel='bookmark' title='KDDI US'>KDDI US</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://xes.cx/?p=4800" rel="bookmark" title="How to create your own Twitpic-like site" target="_blank">http://xes.cx/?p=4800</a></p><p><a href="http://twitter.com/xescx">@xescx</a> explains a useful tip on how to roll your own Twitpic service with WordPress.</p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog' rel='bookmark' title='Create a WordPress tumblog with Headway and WooTumblog'>Create a WordPress tumblog with Headway and WooTumblog</a></li>
<li><a href='http://blogjunkie.net/2007/04/kddi-us' rel='bookmark' title='KDDI US'>KDDI US</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/01/how-to-create-your-own-twitpic-like-site/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved: Cufon text not refreshing on jQuery UI Tabs</title>
		<link>http://blogjunkie.net/2011/01/cufon-text-refresh-jquery-ui-tabs</link>
		<comments>http://blogjunkie.net/2011/01/cufon-text-refresh-jquery-ui-tabs#comments</comments>
		<pubDate>Tue, 11 Jan 2011 15:49:06 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2211</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a><a href="http://blogjunkie.net/section/geek" title="Geek">Geek</a></p>Today I was working on a project that: Made use of jQuery UI Tabs through the WordPress Post Tabs plugin Uses custom fonts for the tabs via Cufon Requires tab font to change color when selected My first attempt was to simply render the tabs with Cufon&#8230; ..and style the active and default states with...
Related posts:<ol>
<li><a href='http://blogjunkie.net/2010/09/simple-form-validation-with-fbjs-on-facebook-page-tabs' rel='bookmark' title='Simple form validation with FBJS on Facebook Page Tabs'>Simple form validation with FBJS on Facebook Page Tabs</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a><a href="http://blogjunkie.net/section/geek" title="Geek">Geek</a></p><p>Today I was working on a project that:</p>
<ol>
<li>Made use of <a title="jQuery UI - Tabs Demos &amp; Documentation" href="http://jqueryui.com/demos/tabs/">jQuery UI Tabs</a> through the <a title="WordPress Post Tabs plugin" href="http://www.clickonf5.org/wordpress-post-tabs">WordPress Post Tabs plugin</a></li>
<li>Uses custom fonts for the tabs via <a title="Cufon SVG font renderer" href="http://cufon.shoqolate.com/">Cufon</a></li>
<li>Requires tab font to change color when selected</li>
</ol>
<p><span id="more-2211"></span></p>
<p>My first attempt was to simply render the tabs with Cufon&#8230;</p>
<pre class="brush: jscript; title: Render Cufon text; notranslate">
jQuery(document).ready(function($){
    Cufon.replace('.ui-tabs .ui-tabs-nav li a');
});
</pre>
<p>..and style the active and default states with CSS.</p>
<pre class="brush: css; title: Give tabs some styles (simplified); notranslate">
/* default tab style */
.ui-tabs .ui-tabs-nav li a {
    color: #454545;
}

/* selected tab style */
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
    color: #FFFFFF;
}
</pre>
<p>So far so good. The tabs were customized quite heavily and now looked like this.</p>
<p><img class="size-full wp-image-2212 alignnone" title="jqueryui-tabs-cufon-01" src="http://blogjunkie.net/files/2011/01/jqueryui-tabs-cufon-01.png" alt="" width="441" height="50" /></p>
<p>However, there was a problem: the Cufon text wasn&#8217;t changing color when you clicked on different tabs.</p>
<p><img class="alignnone size-full wp-image-2213" title="jqueryui-tabs-cufon-02" src="http://blogjunkie.net/files/2011/01/jqueryui-tabs-cufon-02.png" alt="" width="440" height="100" /></p>
<p>The reason for this is because Cufon has already rendered on the page, and because there is no page reload when you click the tabs, Cufon doesn&#8217;t re-render to update the fonts and colors.</p>
<p>Checking the <a title="Cufon API" href="https://github.com/sorccu/cufon/wiki/API">Cufon documentation</a>, I found that you could manually refresh Cufon by calling the <code>Cufon.refresh()</code> function. With jQuery UI Tabs you can bind the refresh function to fire after the <code>tabsshow</code> event:</p>
<pre class="brush: jscript; title: Bind refresh function to tabs show event; notranslate">
$('#tabs_0').bind('tabsshow', function() {
    Cufon.refresh('.ui-tabs .ui-tabs-nav li a');
});
</pre>
<p>Now the tab fonts and colors update when you click on the tabs, yay!</p>
<p>One more thing. In the code above I had to target the <code>#tabs_0</code> selector because that is the selector which the Post Tabs plugin uses to render the tabs. However this wasn&#8217;t very flexible because it wouldn&#8217;t match the other instances of the jQuery UI Tabs which would have the IDs of <code>#tabs_1, #tabs_2, #tabs_3.. #tabs_<em>n</em></code>.</p>
<p>So I turned to Twitter and within minutes <a href="http://twitter.com/cheeaun/status/24758605890719744">I had my answer</a> (thanks <a title="Follow @cheeaun on Twitter" href="http://twitter.com/cheeaun">@cheeaun</a>!). Simply use jQuery&#8217;s <a href="http://api.jquery.com/attribute-starts-with-selector/">Attribute Starts With Selector</a>:</p>
<pre class="brush: jscript; title: Select all elements with IDs that begin with &#039;tabs_&#039;; notranslate">
$('[id^=&quot;tabs_&quot;]').bind('tabsshow', function() {
    Cufon.refresh('.ui-tabs .ui-tabs-nav li a');
});
</pre>
<p>Now, the Tabs are a lot more bulletproof.</p>
<ol>
<li>Cufon text will be updated when new tabs are selected</li>
<li>The code applies to multiple tabs generated by the Post Tabs plugin, i.e. <code>#tabs_1, #tabs_2, #tabs_3.. #tabs__n_</code>.</li>
</ol>
<p>I hope this saves a few people the time spent figuring this out.</p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2010/09/simple-form-validation-with-fbjs-on-facebook-page-tabs' rel='bookmark' title='Simple form validation with FBJS on Facebook Page Tabs'>Simple form validation with FBJS on Facebook Page Tabs</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/01/cufon-text-refresh-jquery-ui-tabs/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Create a WordPress tumblog with Headway and WooTumblog</title>
		<link>http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog</link>
		<comments>http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog#comments</comments>
		<pubDate>Sat, 01 Jan 2011 11:37:01 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[guest post]]></category>
		<category><![CDATA[headway]]></category>
		<category><![CDATA[tumblog]]></category>
		<category><![CDATA[wootumblog]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2159</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://headwaythemes.com/using-headway/create-a-wordpress-tumblog-with-headway-and-wootumblog/" rel="bookmark" title="Create a WordPress tumblog with Headway and WooTumblog" target="_blank">http://headwaythemes.com/using-headway/create-a-wordpress-tumblog-with-headway-and-wootumblog/</a></p>Recently I launched a redesign of my personal blog (blogjunkie.net) which essentially turned it into a tumblog. I achieved the look and functionality with the Headway theme and the WooTumblog plugin. I received a few questions about the redesign so here is a tutorial on how you can do the same with your Headway blog.
Related posts:<ol>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2010/11/wootumblog' rel='bookmark' title='WooTumblog'>WooTumblog</a></li>
<li><a href='http://blogjunkie.net/2009/09/blogjunkienet-headway-giveaway' rel='bookmark' title='blogjunkie.net now powered by Headway (and free giveaway)'>blogjunkie.net now powered by Headway (and free giveaway)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/asides" title="Asides">Asides</a></p><p><a href="http://headwaythemes.com/using-headway/create-a-wordpress-tumblog-with-headway-and-wootumblog/" rel="bookmark" title="Create a WordPress tumblog with Headway and WooTumblog" target="_blank">http://headwaythemes.com/using-headway/create-a-wordpress-tumblog-with-headway-and-wootumblog/</a></p><p><em>Here&#8217;s a guest post I contributed to the Headway blog:</em></p>
<p>Recently I launched a redesign of my personal blog (<a href="http://blogjunkie.net/">blogjunkie.net</a>) which essentially turned it into a tumblog. I achieved the look and functionality with the <a href="http://getheadway.com/">Headway theme</a> and the <a href="http://wordpress.org/extend/plugins/woo-tumblog/">WooTumblog plugin</a>. I received a few questions about the redesign so here is a tutorial on how you can do the same with your Headway blog.</p>
<h3>What is a tumblog / tumblelog?</h3>
<p>Some people were confused with the concept of a tumblog so I thought I would explain it first.</p>
<p>A tumblog is a publishing tool that is in between Twitter (140 characters) and full-blown blogging (500+ words). It’s great for times when you have more to say than what Twitter will allow, but not so much that it deserves an entire blog post. I simply wanted to post a link / image / video and add a comment to it, without worrying about the post formatting. A tumblog is perfect for that.</p>
<p><a href="http://fivenerds.com/">Five Nerds</a> and <a href="http://project.ioni.st/">Projectionist</a> are typical examples of tumblogs–short form snippets of content with occasional long posts.</p>
<p class="more-link-container"><a class="more-link" href="http://headwaythemes.com/using-headway/create-a-wordpress-tumblog-with-headway-and-wootumblog/">Continue reading »</a></p>
<p>Related posts:</p><ol>
<li><a href='http://blogjunkie.net/2010/03/can-drastically-change-how-wordpress-looks-minutes-headway-theme-can' rel='bookmark' title='Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!'>Can you drastically change how WordPress looks in 10 minutes? The Headway theme can!</a></li>
<li><a href='http://blogjunkie.net/2010/11/wootumblog' rel='bookmark' title='WooTumblog'>WooTumblog</a></li>
<li><a href='http://blogjunkie.net/2009/09/blogjunkienet-headway-giveaway' rel='bookmark' title='blogjunkie.net now powered by Headway (and free giveaway)'>blogjunkie.net now powered by Headway (and free giveaway)</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2011/01/create-a-wordpress-tumblog-with-headway-and-wootumblog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bulletproof domain redirection for CPanel Add-On domains</title>
		<link>http://blogjunkie.net/2010/12/bulletproof-domain-redirection-for-cpanel-add-on-domains</link>
		<comments>http://blogjunkie.net/2010/12/bulletproof-domain-redirection-for-cpanel-add-on-domains#comments</comments>
		<pubDate>Mon, 06 Dec 2010 05:45:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogjunkie.net/?p=2072</guid>
		<description><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a><a href="http://blogjunkie.net/section/geek" title="Geek">Geek</a></p>The simple way of domain redirection doesn't work as well for websites that are add-on domains in CPanel environments. This article shows you how to create bulletproof redirects that will work, even for add-on websites.<!--
No related posts.-->]]></description>
			<content:encoded><![CDATA[<p>Posted in <a href="http://blogjunkie.net/section/blog" title="Blog">Blog</a><a href="http://blogjunkie.net/section/geek" title="Geek">Geek</a></p><p>Recently I helped my friend Beth Heavrin of <a href="http://www.smartgreentips.com/">Smart Green Tips</a> to migrate her blog to a new domain name. Along the way I realized that the simple way of domain redirection doesn&#8217;t work as well for websites that are add-on domains in CPanel environments. This article shows you how to create bulletproof redirects that will work, even for add-on websites.</p>
<h3>The Problem</h3>
<p><div id="attachment_2084" class="wp-caption alignright" style="width: 250px"><img class="size-full wp-image-2084" title="cpanel-site-structure" src="http://blogjunkie.net/files/2010/12/cpanel-site-structure.jpg" alt="" width="240" height="270" /><p class="wp-caption-text">CPanel site structure</p></div></p>
<p>In CPanel environments, you start off with a primary domain that resides in the <code>public_html</code> directory. When you add new site to your CPanel hosting, they are added as add-on domains whose root folder are subdirectories of <code>public_html</code>.</p>
<p>You end up with a directory structure in your web hosting account like the image on the right.</p>
<h3>Simple .htaccess Redirects Don&#8217;t Work</h3>
<p>For our example, let&#8217;s assume that the primary domain is <strong>PrimaryDomain.com</strong> and the new domain we want to redirect it to is <strong>AddOn1.com</strong>. To redirect PrimaryDomain.com to AddOn1.com, you may have used this code in the <code>.htaccess</code> file for PrimaryDomain.com:</p>
<pre class="brush: plain; auto-links: false; light: true; title: ; notranslate">
# Redirect 301 / http://www.AddOn1.com/
</pre>
<p>Or, you may have used this code:</p>
<pre class="brush: plain; auto-links: false; light: true; title: ; notranslate">
# RewriteRule ^(.*) http://www.AddOn1.com/$1 [R=301,L]
</pre>
<p>With the code above, PrimaryDomain.com will get redirected to AddOn1.com. But unfortunately visitors to <strong>AddOn2.com</strong> will be wrongly redirected to <strong>AddOn1.com/AddOn2.com</strong>. Same for other add-on domains within the <code>public_html</code> directory.</p>
<p>This is because AddOn2.com is a <em>subdirectory</em> of <code>public_html</code>. The 2 code snippets above redirect everything, including add-on domain subdirectories to AddOn1.com. Confused? Never mind! Just use the solution below.</p>
<h3>The Solution</h3>
<p>The solution is to check the hostname (URL) that the visitor is trying to visit before redirecting them. So, let&#8217;s update our <code>.htaccess</code> file to the following:</p>
<pre class="brush: plain; auto-links: false; light: true; title: ; notranslate">
# Redirect PrimaryDomain.com to www.AddOn1.com
RewriteCond %{HTTP_HOST} ^PrimaryDomain\.com$
RewriteRule ^(.*)$ http://www.AddOn1.com/$1 [R=301,L]

#Redirect www.PrimaryDomain.com to www.AddOn1.com
RewriteCond %{HTTP_HOST} ^www\.PrimaryDomain\.com$
RewriteRule ^(.*)$ http://www.AddOn1.com/$1 [R=301,L]
</pre>
<p>The first block of rules only redirects visitors to <strong>PrimaryDomain.com</strong> and the second block only redirects visitors to <strong><span style="text-decoration: underline;">www</span>.PrimaryDomain.com</strong>. Visitors to AddOn2.com or AddOn3.com will not be redirected. Solved!</p>
<!--<p>No related posts.</p>-->]]></content:encoded>
			<wfw:commentRss>http://blogjunkie.net/2010/12/bulletproof-domain-redirection-for-cpanel-add-on-domains/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

