<?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>Red Letters Studio</title>
	<atom:link href="http://redlettersstudio.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://redlettersstudio.com</link>
	<description>Developing Custom WordPress Solutions</description>
	<lastBuildDate>Fri, 22 Jul 2011 05:04:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Domain Mapping with WordPress Multisite, DreamHost and GoDaddy</title>
		<link>http://redlettersstudio.com/blog/2010/11/29/domain-mapping-with-wordpress-multisite-dreamhost-and-godaddy/</link>
		<comments>http://redlettersstudio.com/blog/2010/11/29/domain-mapping-with-wordpress-multisite-dreamhost-and-godaddy/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 20:41:39 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[domain mapping]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[godaddy]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=819</guid>
		<description><![CDATA[After attending WordCamp Minneapolis I was encouraged and pushed in a session led by Ryan Imel of <a href="http://wpcandy.com">wpcandy.com</a> to go ahead and dive into WordPress Multisite.

Read on to learn how I was able to getting domain mapping working for my WordPress Multisite install using DreamHost and GoDaddy.]]></description>
			<content:encoded><![CDATA[<p>After attending WordCamp Minneapolis I was encouraged and pushed in a session led by Ryan Imel of <a href="http://wpcandy.com">wpcandy.com</a> to go ahead and dive into WordPress Multisite.  I&#8217;ve messed around before with WordPress mu but never went very far.</p>
<p>Now for those of you who are not coming to this post from a Google search WordPress Multisite is a feature built into WordPress that will let you manage an entire network of WordPress installations from on Super Duper Network Admin.  The main benefits are that you can control all of your site easier, upgrades are a cinch and its much less hassle to manage security on a network of sites than on 20 individual sites.</p>
<p>With that knowledge I decided to start to pull all of the clients that I currently manage into one location.</p>
<p>This post will not explain how to set up a WordPress Multisite network but rather it will describe my experience in mapping domains to the network.  If you want to know how to set up a multisite installation go check out this <a href="http://wpcandy.com/teaches/how-to-enable-multisite">tutorial at wpcandy.com</a> first, then come back and see how you can map your domains.  </p>
<p>The only important issue and this is critical,<em> if you are using DreamHost in a shared environment your network must be set up to use the sub-directory option for new sites and not sub-domains</em>.</p>
<p>I will be using specific examples with my host and domain registrar.  If you use a different host and or registrar the screens and processes will be slightly different but hopefully you&#8217;ll have a good idea of what to look for.</p>
<h3>Step 1 &#8211; Install the Domain Mapping Plugin</h3>
<p>So once you have your network set up you need to download and install the <a href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/installation/">Domain Mapping Plugin</a>.  This is not a normal plugin so don&#8217;t install it like you would a normal plugin.  You need to manually move two files. </p>
<p>The first file is the domain_mapping.php file. This needs to go into the mu-plugins folder. The mu-plugins folder is a special folder, which you may not even have yet. Just create it underneath the wp-content folder and put that file into it.  </p>
<p>The second file is the sunrise.php file. This is a special filename for WordPress. Don’t worry about the wacky name, just put it in the wp-content folder and make a mental note that it is not a spam file when you&#8217;re checking your site a few months from now.</p>
<p><b>Activate the sunrise.php file</b><br />
Add this line of code to your wp-config.php file above the line where it says to stop editing.</p>
<pre class="brush: php; title: ; notranslate">
define( 'SUNRISE', 'on' );
</pre>
<p>My file file looks like this at the bottom:</p>
<pre class="brush: php; title: ; notranslate">
define( 'SUNRISE', 'on' );
/* Stop editing */

$server = DB_HOST;
$loginsql = DB_USER;
$passsql = DB_PASSWORD;
$base = DB_NAME;

define('ABSPATH', dirname(__FILE__).'/');

// Get everything else
require_once(ABSPATH.'wp-settings.php');
?&gt;
</pre>
<h3>Step Three &#8211; Get a Unique IP from Dreamhost</h3>
<p>I am running my multisite network on a shared server with Dreamhost.  They do not recommend that you do this but if you are not managing many sites a shared server should work fine.  In your Dreamhost admin panel menu:</p>
<ol>
<li>Click manage domains</li>
<li>Find the domain that you&#8217;ve installed your network under</li>
<li>Click the link &#8216;Add IP&#8217; under the domain</li>
<li>Decide how you want to pay, monthly or yearly and then click the button to confirm and add the ip to the domain</li>
</ol>
<p>You should now have a unique IP address listed under your domain name.  It will look something like this &#8211; 64.230.812.34. Copy this numbered address.</p>
<h3>Step Four &#8211; Configure the Domain Mapping Plugin</h3>
<p>In your Super Admin or Network Admin if you&#8217;re running WP 3.1 find the &#8216;domain mapping&#8217; menu item and choose it.  Paste the IP address you copied earlier from your DreamHost panel into the box asking you for your server IP address.<br />
<img src="http://redlettersstudio.com/wp-content/uploads/2010/11/domainmapping3.png" alt="" title="domainmapping3" width="607" height="431" class="alignnone size-full wp-image-820" /></p>
<p>The other options you see here are as follows:</p>
<ul>
<li>Remote Login – This will make your login pages for all sites redirect to your main site to do the actual login. The benefit of this is that when you log in to one, you log into all of them. The downside is that the URL changes to another domain in order to log in.</li>
<li>Permanent redirect (better for your blogger’s pagerank) – This makes your subdomain or subdirectory sites redirect to their domains. You should leave this on.</li>
<li>User domain mapping page – Turn this on if you want users to be able to put in their own domains for mapping.</li>
<li>Redirect administration pages to blog’s original domain (remote login disabled if redirect disabled) – This makes all admin pages show up on the original domain instead of on the new domains. You need this enabled for remote login to work.</li>
</ul>
<p>I use numbers 2 and 3 but you can choose for yourself.</p>
<h3>Step Five &#8211; Parking Your Domain and Editing the DNS</h3>
<p>At this point we&#8217;ll transition over to GoDaddy to edit the settings for the domain you want to map.  This is not the domain that your network is installed under but rather the domain of an individual site that is part of your network.</p>
<ol>
<li>Log into your GoDaddy account</li>
<li>Navigate to your domain manager screen</li>
<li>Click on the domain you want to map</li>
<li>The domain either needs to be parked or use GoDaddy&#8217;s default namesevers.  You can not have custom nameservers, so if you need to click on &#8220;set namesevers&#8221; link and park your domain do it now</li>
<li>Once your domain is parked or if you are using GoDaddy&#8217;s default nameservers you can launch their new DNS manager.  Click the &#8216;launch&#8217; link in the DNS manager section</li>
<li>You are going to modify the A record.  This should be the first record listed.  Click on the editable area in the &#8216;points to&#8217; column and paste the unique IP  that you purchased from DreamHost for the main domain your network is installed under.</li>
<li>Click the big black &#8216;Save Zone File&#8217; button in the upper right corner of the screen.</li>
<li>Log out of GoDaddy</li>
<p><a href="http://redlettersstudio.com/wp-content/uploads/2010/11/nameserver-dns.jpg"><img src="http://redlettersstudio.com/wp-content/uploads/2010/11/nameserver-dns-300x75.jpg" alt="" title="nameserver-dns" width="300" height="75" class="alignnone size-medium wp-image-821" /></a></p>
<h3>Step Six &#8211; Mapping the Domain in WordPress</h3>
<p>The easiest way for this final step is to login to the backend of the site you are mapping and click the &#8216;domain mapping&#8217; option in the tools menu.  Once you&#8217;ve done that just enter in the full domain that you just edited the dns for, check the box &#8216;primary domain for this blog&#8217;, and click the &#8216;add&#8217; button.</p>
<p>As soon as you do this the changes will take effect and if the DNS has propagated you&#8217;ll be able to access your networked site with its own domain.</p>
<p><img src="http://redlettersstudio.com/wp-content/uploads/2010/11/domain-map1.jpg" alt="" title="domain-map" width="667" height="619" class="alignnone size-full wp-image-823" /></p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/11/29/domain-mapping-with-wordpress-multisite-dreamhost-and-godaddy/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Customizing WordPress Part Three</title>
		<link>http://redlettersstudio.com/blog/2010/11/29/customizing-wordpress-part-three/</link>
		<comments>http://redlettersstudio.com/blog/2010/11/29/customizing-wordpress-part-three/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 18:11:02 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom post types]]></category>
		<category><![CDATA[icons]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=815</guid>
		<description><![CDATA[This is the last in a set of three tutorials based on a talk I gave at the 2010 WordCamp in Minneapolis.  In this tutorial I'm going to give some examples of how I've used custom post types, how to make them better and how to give my clients a better experience in administrating their site.]]></description>
			<content:encoded><![CDATA[<p>This is the last in a set of three tutorials based on a talk I gave at the 2010 WordCamp in Minneapolis.  In this tutorial I&#8217;m going to give some examples of how I&#8217;ve used custom post types, how to make them better and how to give my clients a better experience in administrating their site.</p>
<p><a href="http://redlettersstudio.com/blog/2010/11/15/customizing-wordpress-from-the-inside-out-1/">Part one where I talk about customizing the logo, and admin header and footer is here.</a></p>
<p><a href="http://redlettersstudio.com/blog/2010/11/19/customizing-wordpress-part-two/">And part two where I talk about customizing the dashboard and creating your own custom widgets specifically for your client can be found here.</a></p>
<p>Now, others have covered these topics in detail and I&#8217;ve even talked about them before so if you&#8217;re familiar with the concepts of custom post types and custom taxonomies feel free to skim the next few paragraphs and head south to the examples.  For those of you that just aren&#8217;t quite sure what all the big fuss is about, read on my friend.</p>
<p>A custom post type is a function that you can use to define, input, and organize different types of content into your site.  </p>
<p>Why do I care about this?</p>
<p>So in the past if I had a client that came to me and wanted to build a real estate site where he could list all of properties for sale I would tell him that WordPress could handle it.  And I would set it up so that there would be a properties category that would be checked off and in the theme file I would query to find only the posts marked as properties.  Well that’s all fine and dandy but then the same client says that he also wants to have a blog where he can write about mortgage rates and home selling tips.  And I say ok, no problem.  We’ll just set up a category called blog.</p>
<p>Now here is where it starts to get tricky &#8211; because now I have to explain to the client that each type of content he wants to put on his site is called a post&#8230;</p>
<p>And then I have to deal with writing extra conditional code because when someone clicks on an archive link in the blog section I don’t want all the property listing posts to come up and what about when someone is searching the properties?  I don’t want blog posts mixed in.  So now I have a big headache and a lot of extra coding to do &#8211; not to mention trying to educate my client on the fine art of clicking the right category&#8230;</p>
<p>And at this point I’m not loving WordPress so much and if I’m not loving then my client probably isn’t loving it either.  So it all comes back to giving our users the best experience possible and with WordPress the game changed when custom post types were introduced.</p>
<p>Because now I can separate my property listings from my blog posts.  They have a separate place for data to be input.  They have their own template pages.  They can both be queried easily and the data is completely separate.  I don’t have to worry about publishing an rss feed for my blog only to have all my property listings show up.  It makes things easier.</p>
<p>At the end of the article I will list out a whole bunch of links that will point you to the best tutorials to actually code this stuff out.</p>
<p>So how have I been using them?</p>
<p>The first example is for a site called Green and Main.  They have a lot of different types of content that need to be display and more importantly separated.  Custom post types were a natural fit to do this.</p>
<div id="attachment_816" class="wp-caption alignnone" style="width: 310px"><a href="http://redlettersstudio.com/wp-content/uploads/2010/11/greenmain1.jpg"><img src="http://redlettersstudio.com/wp-content/uploads/2010/11/greenmain1-300x225.jpg" alt="Admin screen shot of the Green and Main site" title="Green and Main Custom Post Types in the Admin" width="300" height="225" class="size-medium wp-image-816" /></a><p class="wp-caption-text">Click for a full-size preview</p></div>
<p>If you click on the full size preview or squint really really hard at the small one you&#8217;ll be able to see that there are 4 different custom post types the site is utilizing.  Its very easy for the client to log in and choose where the content will go.</p>
<p>The next example is for a church called Lakeside Fellowship.  Adding custom post types to this site has been invaluable because there are several volunteers responsible for adding content into the different areas and it makes it nice for them to have their own specific area to manage content.</p>
<div id="attachment_817" class="wp-caption alignnone" style="width: 310px"><a href="http://redlettersstudio.com/wp-content/uploads/2010/11/lakeside1.jpg"><img src="http://redlettersstudio.com/wp-content/uploads/2010/11/lakeside1-300x225.jpg" alt="Screen shot of admin showing custom post types" title="Lakeside Fellowship custom post type example" width="300" height="225" class="size-medium wp-image-817" /></a><p class="wp-caption-text">Click to see full size</p></div>
<p><a href="http://lakesidefellowship.com"><img src="http://redlettersstudio.com/wp-content/uploads/2010/11/lakeside2-300x225.jpg" alt="screenshot of lakeside fellowship&#039;s homepage" title="Lakeside Fellowship Homepage" width="300" height="225" class="alignnone size-medium wp-image-818" /></a></p>
<p>I also used custom post types for law firm so that they could easily add client testimonials without interfering with their blog posts and lastly I utilized custom post types in my <a href="http://www.themegarden.com/josh-byers/meadow-ridge/">real estate theme Meadow Ridge </a>which you can demo and purchase if you like.</p>
<h3>Custom Post Types Even Better</h3>
<p>So now you&#8217;ve gotten an idea of what possible with custom post types.  Here are some ways you can make them even better.</p>
<p>The first is to make them smarter.  <a href="http://somadesign.ca/projects/smarter-custom-post-types/">Matt Wiebe of Soma Design created a custom class for registering custom post types</a> which gives you several cool things:</p>
<ul>
<li>Custom URLs for a landing page for your post type, (eg http://yourdomain.com/movies/, http://yourdomain.com/movies/page/2/, http://yourdomain.com/movies/feed/ )</li>
<li>Full pagination &#038; feed support.</li>
<li>Custom landing page templates: if you registered “movie” as your post type, you can use movie/index.php or movie.php in your theme directory (falls back to index.php if they don’t exist)</li>
<li>Custom single page templates: WP already looks for single-movie.php (and falls back to single.php). This function allows you to use movie/single.php – great alongside movie/index.php for better theme organization.</li>
<li>Adds classes to body_class() and post_class() for that post type.</li>
<li>Auto-generates appropriate admin UI labels if you don’t supply any yourself (otherwise WP defaults to “post” or “page”).</li>
</ul>
<p>The next thing you can do to make your custom post types even better is to make sure you include an icon with your custom post type.  By default the icon will be the pushpin icon that is associated with the post item.  If you want to give your users the best experience possible you&#8217;ll want to include these.</p>
<p>Its very easy to do &#8211; in fact it only takes one line of code when registering your custom post type.  In the example below I&#8217;m registering a post type for different portfolio items I&#8217;m going to include on my site:</p>
<pre class="brush: php; title: ; notranslate">
$properties_args_array = array(
		'labels' =&gt; array(
				'name' =&gt; __( 'Portfolio Items' ),
				'singular_name' =&gt; __( 'Portfolio Item' ),
				'add_new' =&gt; __( 'Add Portfolio Item' ),
				'add_new_item' =&gt; __( 'Add New Portfolio Item' ),
				'edit' =&gt; __( 'Edit' ),
				'edit_item' =&gt; __( 'Edit Portfolio Item' ),
				'new_item' =&gt; __( 'New Portfolio Item' ),
				'view' =&gt; __( 'View Portfolio Items' ),
				'view_item' =&gt; __( 'View Portfolio Item' ),
				'search_items' =&gt; __( 'Search Portfolio Items' ),
				'not_found' =&gt; __( 'No Portfolio Items found' ),
				'not_found_in_trash' =&gt; __( 'No Portfolio Items found in Trash' ),
			),
		'public' =&gt; true,
		'show_ui' =&gt; true,
		'query_var' =&gt; true,
		'hierarchical' =&gt; false,
		'menu_position' =&gt; 5,
		'menu_icon' =&gt; get_stylesheet_directory_uri() . '/images/icon-property.png',
		'supports' =&gt; array('title', 'thumbnail','editor', 'tags', 'author'),
	);
</pre>
<p>Notice the line for &#8216;menu_icon.&#8217;  All you need to do is upload your icon and put in the path to where you decided to keep it on the server.  The icon should be 16&#215;16 pixels and gray to fit the default WordPress color scheme.</p>
<p>This post is getting a little long so I&#8217;ll save the rest of the customizations for some additional posts.  In the future I&#8217;ll be talking about how to add custom post columns, custom taxonomy columns, large custom post icons, custom taxonomies, and custom meta boxes.</p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/11/29/customizing-wordpress-part-three/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Customizing WordPress Part Two</title>
		<link>http://redlettersstudio.com/blog/2010/11/19/customizing-wordpress-part-two/</link>
		<comments>http://redlettersstudio.com/blog/2010/11/19/customizing-wordpress-part-two/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 07:03:49 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=812</guid>
		<description><![CDATA[This is the second in a set of three tutorials based on a talk I gave at the 2010 WordCamp in Minneapolis.  

In this tutorial we will cover how to customize your clients dashboard by first getting rid of some of the things they don't need and then by adding in some of our own helpful widgets.]]></description>
			<content:encoded><![CDATA[<p>This is the second in a set of three tutorials based on a talk I gave at the 2010 WordCamp in Minneapolis.  In this tutorial we will cover how to customize your clients dashboard by first getting rid of some of the things they don&#8217;t need and then by adding in some of our own helpful widgets.</p>
<p><a href="http://redlettersstudio.com/blog/2010/11/15/customizing-wordpress-from-the-inside-out-1/">Part one where I talk about customizing the logo, and admin header and footer is here.</a></p>
<h3>Cleaning Up The Dashboard</h3>
<p>A default WordPress install comes with a few defaults already in place.  You normally get the 2010 theme, a couple plugins, and some widgets.  You also get some meta boxes that purport to display helpful information on the dashboard when you first log in.  These are:</p>
<ul>
<li>Right Now &#8211; which displays how many posts you&#8217;ve written, what version of WordPress you&#8217;re running among others things.</li>
<li>Recent Comments &#8211; this displays the most recent comments to your site and give you a quick and easy way to manage them.  And if you don&#8217;t ever get comments it ends up being a sad commentary on your life.</li>
<li>Recent Drafts &#8211; a quick view of the posts that you intended to finish but probably never will.</li>
<li>Quick Press &#8211; one of the fastest ways to get something published.  You don&#8217;t want to be bothered with silly post screens, you need to get stuff done!</li>
<li>Incoming Links &#8211; this shows how popular you really are with all the cool kids.  In your case its like being picked last for dodgeball all over again.</li>
<li>Plugins &#8211; this tells us all what is new and exciting in the world of WordPress plugins!</li>
<li>WordPress Blog &#8211; this is a feed of the most recent posts coming from the official WordPress blog.</li>
<li>Other WordPress News &#8211; if the WordPress blog wasn&#8217;t enough you get to double your pleasure with even more WP goodness.</li>
</ul>
<p>Personally I don&#8217;t use many of these and I don&#8217;t see a need for the majority of my clients to have access to these items.  The dashboard real estate is very valuable &#8211; its the one screen that your users will see every time they log in.</p>
<p>Every client will be different, but generally I believe the only items worth keeping around might be the recent comments, simply for the ability to very quickly moderate comments, and the incoming links.</p>
<p>So how do you get rid of the others?  Here we go.</p>
<h3>Removing Default Meta Boxes</h3>
<pre class="brush: php; title: ; notranslate">
add_action('wp_dashboard_setup', 'custom_dashboard_widgets');

function custom_dashboard_widgets() {
	global $wp_meta_boxes;

	// var_dump( $wp_meta_boxes['dashboard'] );
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
</pre>
<p>So what&#8217;s going on here?<br />
First, realize that this is not the complete function &#8211; we&#8217;ll get the rest in a second.</p>
<p>But the first thing we are doing is hooking into the dashboard_setup action in WordPress and we are creating a custom function called &#8220;custom_dashboard_widgets.&#8221;  We&#8217;re calling it this because we&#8217;ll first get rid of the widgets we don&#8217;t want and then we&#8217;ll add in a few of our own.</p>
<p>The next thing happening is that we are systematically un-setting or removing specific meta boxes.  All we are really looking for is the id of the container of the meta box.  So you can remove just about any meta box using the code above and plugging in the id of the meta box you want gone at the end.</p>
<p>You&#8217;ll also notice that there is a bit of code commented out.  If you un-comment this code it will reveal all the id&#8217;s of the meta boxes as well for you.</p>
<p>If you have issues with this &#8211; it may be because you&#8217;ve moved your widgets around before you added this code to your functions.php file.</p>
<h3>Adding In Our Own Custom Widgets</h3>
<p>Next we&#8217;ll continue the function from above and add in three custom widgets of our own.</p>
<pre class="brush: php; title: ; notranslate">
wp_add_dashboard_widget('dashboard_custom_feed', 'Latest from Red Letters Studio', 'dashboard_custom_feed_output'); //add new rss feed output
wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'custom_dashboard_help'); // add a new custom widget for help and support
wp_add_dashboard_widget('random_support_tip', 'Helpful Tips', 'random_tips'); // add a new custom widget for help and support
}
</pre>
<p>Here&#8217;s what you need to add in your own custom widget.  The code we pasted above just identifies and calls the widgets.  We still need to create the actual widget.<br />
In the parentheses the first thing is the id of the widget (dashboard_custom_feed), the second item is the title of the widget (Latest from Red Letters Studio) and the third item is the name of the function that you will use to run the widget (dashboard_custom_feed_output).  And these can be anything you choose &#8211; just make sure that your function names are the same.</p>
<p>Next up is to create the functions for the widgets.  The first widget we are creating is a simple feed reader.  You can use this to bring in any rss feed on the web.  I suggested in my talk that this would be a good way to get your latest news in front of your clients.  Let them know what is going on in your company.  Do you have any new products?  Can you showcase anything exciting for them?</p>
<pre class="brush: php; title: ; notranslate">
function dashboard_custom_feed_output()
{
	echo '&lt;div class=&quot;rss-widget&quot;&gt;';
	wp_widget_rss_output(array(
		'url' =&gt; 'http://redlettersstudio.com/themes/feed',
		'title' =&gt; 'New at Red Letters Studio',
		'items' =&gt; 3,
		'show_summary' =&gt; 1,
		'show_author' =&gt; 0,
		'show_date' =&gt; 1 ,
		'show_image' =&gt; 1
	));
	echo &quot;&lt;/div&gt;&quot;;
}
</pre>
<p>Next is a widget that has some simple text.  I want my clients to be able to contact me if they have issues or questions so lets get that information in front of them.</p>
<pre class="brush: php; title: ; notranslate">
function custom_dashboard_help() {
	echo '
		&lt;p&gt;Having trouble figuring out what something does on the page?  Check out the &quot;help&quot; tab in the upper right of your screen. It will provide contextual help throughout the administrative panel. &lt;/p&gt;
		&lt;p&gt;If you need additional support, you can contact your web team at &lt;a href=&quot;http://redlettersstudio.com&quot;&gt;Red Letters Studio&lt;/a&gt;&lt;/p&gt;
		&lt;p&gt;&lt;strong&gt;phone:&lt;/strong&gt; 515-392-6581&lt;br /&gt;
		&lt;strong&gt;email:&lt;/strong&gt; &lt;a href=&quot;mailto:support@redlettersstudio.com&quot;&gt;support@redettersstudio.com&lt;/a&gt;&lt;p&gt;
	';
}
</pre>
<p>And lastly I want to post a random tip to help my clients out with some of the functionalities of WordPress.  This is not a new concept but it was brought to my attention recently while playing the new Goldeneye game.  While you&#8217;re waiting for the game to load they pop up helpful tips so that you can play the game better.  </p>
<p>So for this example I just re-purposed the code used for the familiar Hello Dolly plugin.  The idea of that plugin is that it will display a random line from Hello Dolly.  All I did was change the lines.</p>
<pre class="brush: php; title: ; notranslate">
$tips =
&quot;Posts are for blogging
Use keywords in your titles
Don't copy and paste from Word&quot;;

$tips = explode(&quot;\n&quot;, $tips);
$chosen = wptexturize( $tips[ mt_rand(0, count($tips) - 1) ] );

function random_tips() {
	global $chosen;
	echo &quot;&lt;p id='tips'&gt;$chosen&lt;/p&gt;&quot;;
}
</pre>
<p>That&#8217;s all folks!  In the next and last post in this customizing series, we&#8217;ll take a look at Custom Post Types, Custom Taxonomies and Custom Meta Boxes.</p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/11/19/customizing-wordpress-part-two/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Customizing WordPress From the Inside Out</title>
		<link>http://redlettersstudio.com/blog/2010/11/15/customizing-wordpress-from-the-inside-out-1/</link>
		<comments>http://redlettersstudio.com/blog/2010/11/15/customizing-wordpress-from-the-inside-out-1/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 18:45:11 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=791</guid>
		<description><![CDATA[<p>This is the first of a three-part series detailing the talk I gave at WordCamp MSP.</p>  <p> The first will cover the login screen, admin header and footer.  The second will cover customizing the WordPress dashboard, and the third will cover custom post types, custom taxonomies, and custom meta boxes.</p>  <p>Once the last post is up I'll also include a single file with all the code and templates that you can download.</p>]]></description>
			<content:encoded><![CDATA[<p>This past weekend I had the wonderful privilege to speak at the first <a href="http://www.wordcampmsp.org/">WordCamp held in Minneapolis</a>.  My session was the first one and its always good to be one of the first sessions in the day because you normally get the liveliest crowds and everyone is pretty excited about being there.  There was a great crowd  in the Best Buy theater and it was a lot of fun presenting my talk to all of them.</p>
<p>There were five different tracks at WordCamp MSP that ranged from developer to blogger.  Since my session was slotted in the developer track the main goal I had was to get developers to take a look at the little details they add that could improve the usability and wow factor of WordPress.  Basically I wanted to show the audience how to give their users the richest experience possible when using WordPress.</p>
<p>I started with a quick story on how focusing on the details made Lord of the Rings such a success.  I highlighted examples such as spending over 2 years in the pre-production of Hobbiton.  Alan Lee, one of the conceptual designers of the movies said this:</p>
<blockquote><p>
I quite like the fact that we spent quite a bit of time designing things that you barely see. You just catch a glimpse of it, rather than have it being in center frame, to milk it for all it&#8217;s worth. Having those details in the background helps to create the idea that we are in this very rich world and it makes it more believable.
</p></blockquote>
<p>I&#8217;m splitting this post up into three parts.  The first will cover the login screen, admin header and footer.  The second will cover customizing the WordPress dashboard, and the third will cover custom post types, custom taxonomies, and custom meta boxes.  Once the last post is up I&#8217;ll also include a single file with all the code and templates that you can download.</p>
<p>The <a href="http://www.slideshare.net/joshbyers/customizing-wordpress-from-the-inside-out">slides from the presentation are available on Slide Share here</a>.</p>
<p>So with that intro I delved into five areas that you can customize and use to give your users a great experience using WordPress.</p>
<h3>The Login Screen</h3>
<p>The first area I covered was the login screen.  I have written a plugin called <a href="http://redlettersstudio.com/wordpress-custom-admin-branding/">Custom Admin Branding</a> that will let you modify and customize the login screen (and the header and footer of the admin) but a lot of developers (myself included) would like to eliminate the use of plugins as much as possible.</p>
<p>In your functions.php between your opening and closing php tags include this code:</p>
<pre class="brush: php; title: ; notranslate">
/*********************************************
 Customized Admin
*********************************************/

//We do our login customization here and we'll wrap the rest in &quot;is_admin&quot;
add_action( 'login_head', 'custom_login_css' );

function custom_login_css() {
	echo '&lt;link rel=&quot;stylesheet&quot; href=&quot;' . get_bloginfo('stylesheet_directory') . '/custom-admin/admin-styles.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;';
}
</pre>
<p>This action hooks into the header on the login page and the function adds in our custom style sheet called &#8220;admin-styles.css&#8221; which I&#8217;ve placed in a new directory called &#8220;custom-admin.&#8221;</p>
<p>In the admin-styles.css file add in this code:</p>
<pre class="brush: css; title: ; notranslate">
.login h1 a {
	background-image: url(images/login-logo.png);
	}
</pre>
<p>This is replacing the background image for the heading one anchor element in div container with the class of &#8220;login.&#8221;  I&#8217;ve also created another directory inside of custom-admin called &#8220;images&#8221; which I&#8217;ll use to place all of my customized images in.  This code assumes you have an image called &#8220;login-logo.png&#8221; in that images directory.</p>
<p>If you want, you can <a href="http://redlettersstudio.com/wp-content/uploads/2010/11/login-logo-template.psd_.zip">download the .psd I used to create the admin login logo</a>.</p>
<p>Here is the result.<br />
<div id="attachment_792" class="wp-caption alignnone" style="width: 310px"><img src="http://redlettersstudio.com/wp-content/uploads/2010/11/wp-custom-login-300x269.jpg" alt="WordPress Custom Login Screen" width="300" height="269" class="size-medium wp-image-792" /><p class="wp-caption-text">The WordPress login screen using a custom image.</p></div></p>
<h3>The WordPress Admin Header</h3>
<p>The main goal here is to again put in a little detail that will give your client a better experience in using WordPress.  People love to hear their name spoken and companies and employees love to see their logo splashed all over the place.  By placing your clients logo in the header of the admin of their site you create automatic ownership and pride.</p>
<p>I like to do a lot of customizing in my theme&#8217;s functions.php file so to keep things organized and for my own sanity I&#8217;ll often split up different customization into separate files and then include them in my theme&#8217;s functions.php file.  That is what I&#8217;ve done in this tutorial.  If you would like to do that paste the code below in your theme&#8217;s functions.php file.</p>
<pre class="brush: php; title: ; notranslate">
//This is just to keep stuff a little better organized for my sanity
if ( is_admin() ) require_once('custom-admin/custom-functions.php');
</pre>
<p>Again what this code is doing is including a separate php file that I&#8217;m writing all of my customization code in.  You can change the names or the file structure if you want.</p>
<p>The other thing this is doing is ensuring that these customizations only run on admin screens.</p>
<p>So now back to modifying the header logo&#8230;  In your custom-functions.php file paste this code between opening and closing php tags.</p>
<pre class="brush: php; title: ; notranslate">
/*********************************************
 Calling in the custom admin stylesheet
*********************************************/

add_action( 'admin_print_styles', 'load_custom_admin_css' );

function load_custom_admin_css() {
	wp_enqueue_style( 'custom_admin_css', get_bloginfo('stylesheet_directory') . '/custom-admin/admin-styles.css' );
}
</pre>
<p>This is very similar to what we did for the logo.  I&#8217;m actually using the same style sheet.  The reason we need to call it twice (once in the theme&#8217;s functions.php and once in my custom-functions.php) is because of the WordPress action hooks used.  The hook we used for the custom login logo will only fire when the login screen is presented.  The hook we are using here called &#8220;admin_print_styles&#8221; will fire on any page in the admin.</p>
<p>So once we have the code in place to include our custom style sheet I can write the css to override the WordPress logo in the header.  Copy and paste this code in your &#8220;admin-styles.css file.</p>
<pre class="brush: css; title: ; notranslate">
#header-logo {
	background-image: url(images/header-logo.png);
}
</pre>
<p>I&#8217;ve formatted my header logo to be the exact size as the previous WordPress logo (32px by 32px).  If your logo or image is a different size you&#8217;ll need to declare that in your custom css class like this:</p>
<pre class="brush: css; title: ; notranslate">
#header-logo {
	background-image: url(images/header-logo.png);
        height: 100px; //or whatever your image height is
        width: 150px; //or whatever your img width is
}
</pre>
<p><a href="http://redlettersstudio.com/wp-content/uploads/2010/11/admin-logo-template.psd_.zip">You can download the .psd I used to create the logo.</a></p>
<p>And the result is this:<br />
<img src="http://redlettersstudio.com/wp-content/uploads/2010/11/wp-custom-header-300x108.jpg" alt="WordPress Custom Header Logo" width="300" height="108" class="alignnone size-medium wp-image-795" /></p>
<h3>The WordPress Admin Footer</h3>
<p>The last item for this post is to modify the footer in the admin with some custom text.</p>
<p>In your custom-fuctions.php file paste this code:</p>
<pre class="brush: php; title: ; notranslate">
/*********************************************
 Custom Footer Text
*********************************************/

add_filter( 'admin_footer_text', 'custom_footer_text' );

function custom_footer_text($default_text)  {
	return '&lt;span&gt;Site managed by &lt;a href=&quot;http://redlettersstudio.com&quot;&gt;Red Letters Studio&lt;/a&gt;&lt;span&gt; | Powered by &lt;a href=&quot;http://www.wordpress.org&quot;&gt;WordPress&lt;/a&gt;';
}
</pre>
<p>This code is using a WordPress filter which allows us to override certain things in WordPress.  This particular filter allows us to put in our own custom text.  Use your own custom text and html where the function is being returned.</p>
<p>Look for parts 2 and 3 of my presentation to come soon.  Hit me up below with any questions or comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/11/15/customizing-wordpress-from-the-inside-out-1/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Designing For WordPress Video</title>
		<link>http://redlettersstudio.com/blog/2010/07/23/designing-for-wordpress-video/</link>
		<comments>http://redlettersstudio.com/blog/2010/07/23/designing-for-wordpress-video/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 17:57:17 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=691</guid>
		<description><![CDATA[I recently had the privilege to attend WordCamp Boulder and participate on a panel discussing design in general and specifically how it relates to the web and WordPress.

It was an awesome experience that I thought went pretty well.  Thanks go to my two great co-panelists, <a href="http://www.kevinmenzie.com/">Kevin Menzie</a> of <a href="http://www.sliceoflime.com/">Slice of Lime</a>, <a href="http://www.alternate.org/">Kevin Conboy</a> of <a href="http://automattic.com/">Automatic</a> and our moderator <a href="http://flavors.me/devinreams/">Devin Reams</a> of <a href="http://crowdfavorite.com/">Crowd Favorite</a>.]]></description>
			<content:encoded><![CDATA[<p>I recently had the privilege to attend WordCamp Boulder and participate on a panel discussing design in general and specifically how it relates to the web and WordPress.</p>
<p>It was an awesome experience that I thought went pretty well.  Thanks go to my two great co-panelists, <a href="http://www.kevinmenzie.com/">Kevin Menzie</a> of <a href="http://www.sliceoflime.com/">Slice of Lime</a>, <a href="http://www.alternate.org/">Kevin Conboy</a> of <a href="http://automattic.com/">Automattic</a> and our moderator <a href="http://flavors.me/devinreams/">Devin Reams</a> of <a href="http://crowdfavorite.com/">Crowd Favorite</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/07/23/designing-for-wordpress-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Practical Use Case for Custom Post Types</title>
		<link>http://redlettersstudio.com/blog/2010/07/12/practical-use-case-for-custom-post-types/</link>
		<comments>http://redlettersstudio.com/blog/2010/07/12/practical-use-case-for-custom-post-types/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 07:02:14 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=687</guid>
		<description><![CDATA[I just thought I would share a snippet in my most recent project where we have used the new custom post type feature available in WordPress 3.0. Just a quick refresher on what custom post types are: A custom post type could probably be better termed as a &#8220;custom content type&#8221; because it doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>I just thought I would share a snippet in my most recent project where we have used the new custom post type feature available in WordPress 3.0.</p>
<p>Just a quick refresher on what custom post types are:  A custom post type could probably be better termed as a &#8220;custom content type&#8221; because it doesn&#8217;t have to be a &#8220;post&#8221; at all.  In fact if you are creating these for blog posts you&#8217;re probably using them wrong and you would be better served to just organize your content by category or tag or another custom taxonomy.</p>
<p>In WordPress there are two major types of content that most sites use &#8211; pages and posts.  Having these two different types of content allow the developer to easily separate out different types of content.  Adding in a custom post type allows the developer to separate out even more content.  So before what usually would have been organized by a category or tag can now be its own separate entity.</p>
<p>So for this article we have a site where the client is utilizing pages for main content areas, they have a blog where they will be posting news and articles and they would also like to be able to put client quotes on the site.  Before WordPress 3 I most likely would have set up the site to have a category called &#8220;quotes&#8221; and would have instructed to the client to not create their blog posts in the posts section but also their client quotes.  While this isn&#8217;t a big deal if we can keep the blog posts and the quotes separate it makes it that much easier on the client and keeps all the quotes out of the default rss feed, site wide search, and archives.</p>
<p>So how do we do it?</p>
<pre>
add_action( 'init', 'create_my_post_types' );

function create_my_post_types() {
	register_post_type( 'client-quotes',
		array(
			'labels' =&gt; array(
				'name' =&gt; __( 'Client Quotes' ),
				'singular_name' =&gt; __( 'Client Quote' ),
				'add_new' =&gt; __( 'Add New' ),
				'add_new_item' =&gt; __( 'Add New Client Quote' ),
				'edit' =&gt; __( 'Edit' ),
				'edit_item' =&gt; __( 'Edit Client Quote' ),
				'new_item' =&gt; __( 'New Client Quote' ),
				'view' =&gt; __( 'View Client Quote' ),
				'view_item' =&gt; __( 'View Client Quote' ),
				'search_items' =&gt; __( 'Search Client Quotes' ),
				'not_found' =&gt; __( 'No client quotes found' ),
				'not_found_in_trash' =&gt; __( 'No client quotes found in Trash' ),
				'parent' =&gt; __( 'Parent Client Quote' ),
			),
			'public' =&gt; true,
			'exclude_from_search' =&gt; true,
			'menu_position' =&gt; 20,
			'menu_icon' =&gt; get_stylesheet_directory_uri() . '/images/customer-quotes-icon.png',
			'query_var' =&gt; true
		)
	);
}
</pre>
<p>I won&#8217;t go through what every bit of code means.  For that check out <a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress">Justin Tadlock&#8217;s comprehensive article on custom post types</a>.</p>
<p>A couple things I would like to point out however I believe are essential to giving your client a good experience with custom post types, because these are supposed to make content management easier right?</p>
<p>First, label everything.  You don&#8217;t want your client clicking the custom post type menu item and then having the page header say &#8220;add new post.&#8221;  That would confuse the heck out of them.</p>
<p>Second, give your custom post type and nice icon that matches with the rest of the admin icons.  You can see the screen shot below for this particular use case.</p>
<p><img src="http://redlettersstudio.com/wp-content/uploads/2010/07/Screen-shot-2010-07-12-at-1.56.20-AM.png" alt="" width="669" height="497" class="alignnone size-full wp-image-688" /></p>
<p>After we have the quotes entered in, now it is a simple query to extract them.</p>
<pre>
<div class="page_quotes">

			 'client-quotes', 'posts_per_page' =&gt; 10 ) ); ?&gt;

			have_posts() ) : $loop-&gt;the_post(); ?&gt;
<div class="the_quote"></div>
</div>
</pre>
<p>And to finish it off, I put these all in a jQuery slideshow so that they the rotate nicely on the page.</p>
<p><img src="http://redlettersstudio.com/wp-content/uploads/2010/07/Screen-shot-2010-07-12-at-1.56.52-AM.jpg" alt="" width="690" height="529" class="alignnone size-full wp-image-689" /></p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/07/12/practical-use-case-for-custom-post-types/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting a List of Custom Taxonomies</title>
		<link>http://redlettersstudio.com/blog/2010/07/08/getting-a-list-of-custom-taxonomies/</link>
		<comments>http://redlettersstudio.com/blog/2010/07/08/getting-a-list-of-custom-taxonomies/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 05:27:50 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=674</guid>
		<description><![CDATA[This particular bit of code stemmed from a current project that I am working on. The issue at hand is that I have a number of attorneys each who specialize in different practices of law. Each lawyer has their own page with a list of their areas of practice. This seemed like the perfect opportunity [...]]]></description>
			<content:encoded><![CDATA[<p>This particular bit of code stemmed from a current project that I am working on.</p>
<p>The issue at hand is that I have a number of attorneys each who specialize in different practices of law.  Each lawyer has their own page with a list of their areas of practice.</p>
<p>This seemed like the perfect opportunity to leverage the custom taxonomy feature in WordPress. <span id="more-674"></span> So I set up a custom taxonomy called &#8220;Areas of Expertise.&#8221;  Here is the code to register the taxonomy which goes in your functions file.</p>
<pre>
register_taxonomy( 'expertise', 'page', array( 'hierarchical' =&gt; true, 'label' =&gt; 'Areas of Expertise', 'query_var' =&gt; true, 'rewrite' =&gt; true,'show_in_nav_menus' =&gt; false ) );
</pre>
<p>I won&#8217;t explain everything that is going on there &#8211; if you want a good intro on custom taxonomies read the <a href="http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/">article on tutsplus</a>.</p>
<p>So now the custom taxonomy is showing up on each page and I can check off all the areas of practice just like you would do for categories.</p>
<p><img src="http://redlettersstudio.com/wp-content/uploads/2010/07/Screen-shot-2010-07-09-at-12.04.55-AM.png" alt="" width="299" height="336" class="alignnone size-full wp-image-675" /></p>
<p>So now I need to be able to display each area of practice on the individual attorney page but not only that I also need to link it to the specific page that talks about that area of practice the firm offers.  So if Daniel Martin specializes in School Law I need Daniel Martin&#8217;s page to list School Law and also link to the School Law page.  Simple enough it seems but the standard way to print out custom taxonomies not only prints out the taxonomy, it also includes a link to the taxonomy template page.  So for each custom taxonomy you create WordPress also &#8220;creates&#8221; a template page for that custom taxonomy.  It is the same thing WordPress does with categories and tags.  Each time you create a new category or tag WordPress will have a page available to list all the posts associated with that category or tag.</p>
<p>My problem is that I need that custom taxonomy to link to a specific page I created not the general taxonomy page WordPress creates.  And when using the standard WordPress function get_the_terms, you&#8217;re stuck with the link WordPress gives you.  So being smart I thought I would name organize my pages to be the same as the link WordPress puts out but that opened up a portal to hell I believe and totally screwed with the entire permalink structure and for all I know almost brought down the entire internet.</p>
<p>So I needed a way to get the custom taxonomy without having WordPress be helpful and supply its own link.  Here is the golden code that took me the better part of two google days to figure out.</p>
<pre>
ID, 'expertise');
echo '
<ul class="areas_of_expertise">';
foreach ($terms as $taxindex =&gt; $taxitem) {
echo "
<li><a>slug ."'&gt;" . $taxitem-&gt;name . "</a></li>

";
}
echo '</ul>

'
?&gt;
</pre>
<p>Alright so let me quickly explain what is going on here.  First I get a couple variables that we&#8217;ll use later &#8211; the site url and all the custom taxonomies associated with name &#8220;expertise.&#8221;<br />
This code here grabs all the terms for the expertise taxonomy that are associated with this particular post and stores them in an array.  So right now I have all the areas my lawyer practices in stored in an array.  I now need to get them onto the page.<br />
So I use the foreach loop to go through the array and echo out each item that matches.  There are a number of things you can echo with this array including the slug and the name of the taxonomy.  If you want to see exactly what you can echo include this code and look at the items in the brackets &#8211; those are the things you can echo.</p>
<pre>
print_r($terms);
</pre>
<p>I needed to echo the slug which I used to get the exact url of the page for the area of practice and of course the name of taxonomy itself.  And this is the result!<br />
<img src="http://redlettersstudio.com/wp-content/uploads/2010/07/Screen-shot-2010-07-09-at-12.26.23-AM.png" alt="" width="319" height="315" class="alignnone size-full wp-image-676" /></p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/07/08/getting-a-list-of-custom-taxonomies/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>WordPress Tips &#8211; Navigation with Query Posts</title>
		<link>http://redlettersstudio.com/blog/2010/07/07/wordpress-tips-navigation-with-query-posts/</link>
		<comments>http://redlettersstudio.com/blog/2010/07/07/wordpress-tips-navigation-with-query-posts/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 04:40:19 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=670</guid>
		<description><![CDATA[This has been pretty well documented but one more article only increases the odds that someone finds what they are looking for sooner I run into this issue with a lot of sites I create since most of these sites are using WordPress for their full cms and blog. When using the query posts function [...]]]></description>
			<content:encoded><![CDATA[<p>This has been pretty well documented but one more article only increases the odds that someone finds what they are looking for sooner <img src='http://redlettersstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I run into this issue with a lot of sites I create since most of these sites are using WordPress for their full cms and blog.</p>
<p>When using the query posts function in a page it overrides pretty much every other function that WordPress uses to find posts including the one for pagination.  So the solution is to recreate the pagination through the &#8220;paged&#8221; parameter.</p>
<p>Here is the code:</p>
<pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/07/07/wordpress-tips-navigation-with-query-posts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WCChicago2010</title>
		<link>http://redlettersstudio.com/blog/2010/06/04/wcchicago2010/</link>
		<comments>http://redlettersstudio.com/blog/2010/06/04/wcchicago2010/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 06:10:34 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=661</guid>
		<description><![CDATA[Hey everybody! Thanks for enduring my presentation and if you didn&#8217;t come the stuff below probably won&#8217;t make a lot of sense but thanks for reading anyway Fair-Play Scoreboards The function used here was to get the id of the current page or post and then store it in a variable. Then we queried the [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everybody!</p>
<p>Thanks for enduring my presentation and if you didn&#8217;t come the stuff below probably won&#8217;t make a lot of sense but thanks for reading anyway <img src='http://redlettersstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Fair-Play Scoreboards</h3>
<p>The function used here was to get the id of the current page or post and then store it in a variable.</p>
<pre>
</pre>
<p>Then we queried the database to find only posts that have a tag that matches the current page&#8217;s id.</p>
<pre>
<li>&lt;a href=&quot;"&gt;&lt;img src=&quot;/images/accessory_thumbs/.jpg" alt="" title="" /&gt;</a></li>
</pre>
<h3>Willow Creek Baptist Church</h3>
<p>This is code used to query the parent page of each of the individual sermon series.</p>
<pre>
</pre>
<p>We also needed to get the name of the current post and store it in a variable.  Here is that code:</p>
<pre>
post_name; ?&gt;
</pre>
<p>And the last thing was to show the span of dates which we needed to query the first post and the last post.</p>
<pre>
$my_query = get_posts("numberposts=1&amp;category_name=$catname&amp;order=ASC");
$my_query = get_posts("numberposts=1&amp;category_name=$catname&amp;order=DSC");
</pre>
<h3>Bill Darrah Builders</h3>
<p>The challenge here was to display all the images attached to a post.  The solution was found from the guys and Digging into WordPress.  <a href="http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/">You can read the original post here.</a></p>
<p>And here is the actual query that does all the work.</p>
<pre>
 'ASC',
    'orderby' =&gt; 'menu_order ID',
    'post_type'      =&gt; 'attachment',
    'post_parent'    =&gt; $post-&gt;ID,
    'post_mime_type' =&gt; 'image',
    'post_status'    =&gt; null,
    'numberposts'    =&gt; -1,
);
$attachments = get_posts($args);
if ($attachments) {
    foreach ($attachments as $attachment) {

        echo wp_get_attachment_link($attachment-&gt;ID, 'thumbnail', false, false);
    }
}
?&gt;
</pre>
<h3>Green is Sexy</h3>
<p>This is the looping function used to get multiple category icons attached to a post.</p>
<pre>
category_nicename;
                            echo "<a href='$siteurl/category/$catname'><img style='margin:0' alt='$catname' src='$templateurl/images/cat-icons/$catname.png'></a>";
                            }
                            ?&gt;
</pre>
<h3>Custom Post Types</h3>
<p><a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress">In my opinion here is the definitive article right now on Custom Post Types.</a></p>
<h3>Custom Meta Boxes</h3>
<p><a href="http://farinspace.com/2010/04/how-to-create-custom-wordpress-meta-box/">How to Create a Custom Meta Box</a></p>
<h3>Custom Taxonomies</h3>
<p><a href="http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/">Introducing Custom Taxonomies<br />
</a></p>
<h3>Custom Admin Branding</h3>
<p>If you are interested in the plugin I built to help brand your login screen and admin, <a href="http://wordpress.org/extend/plugins/custom-admin-branding/">you can find it here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2010/06/04/wcchicago2010/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Post Link Problems</title>
		<link>http://redlettersstudio.com/blog/2009/12/03/post-link-problems/</link>
		<comments>http://redlettersstudio.com/blog/2009/12/03/post-link-problems/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:18:30 +0000</pubDate>
		<dc:creator>Josh Byers</dc:creator>
				<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[broken]]></category>
		<category><![CDATA[doesn't work]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[next_post_link]]></category>
		<category><![CDATA[previous_post_link]]></category>

		<guid isPermaLink="false">http://redlettersstudio.com/?p=498</guid>
		<description><![CDATA[Why won't the previous_post_link and next_post_link tags work?  They seem to be broken and won't exclude a specific post category.]]></description>
			<content:encoded><![CDATA[<p>I had been fighting with the previous_post_link and next_post_link tags all morning trying to figure out why it wouldn&#8217;t exclude a post from a specific category.</p>
<p>Turns out that the post I was trying to exclude was listed in two categories and if you don&#8217;t exclude both it will not be removed from the navigation loop.</p>
<p>So short answer: <strong>exclude every category a post is listed in</strong></p>
<pre>
</pre>
<p>For more information on the <a href="http://codex.wordpress.org/Template_Tags/previous_post_link">post_link tags check out the WordPress Codex</a></p>
]]></content:encoded>
			<wfw:commentRss>http://redlettersstudio.com/blog/2009/12/03/post-link-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

