<?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>Taylor D Dewey</title> <atom:link href="http://websitesthatdontsuck.com/feed/" rel="self" type="application/rss+xml" /><link>http://websitesthatdontsuck.com</link> <description>Designing Websites That Don&#039;t Suck Since 1998</description> <lastBuildDate>Fri, 27 Jan 2012 03:22:44 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>One simple trick to find design issues</title><link>http://websitesthatdontsuck.com/2012/01/one-simple-trick-to-find-design-issues/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=one-simple-trick-to-find-design-issues</link> <comments>http://websitesthatdontsuck.com/2012/01/one-simple-trick-to-find-design-issues/#comments</comments> <pubDate>Fri, 27 Jan 2012 03:22:44 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1329</guid> <description><![CDATA[<p>Two times in the last few hours I&#8217;ve found areas of a design that could be improved by using one simple trick: By shifting my perspective, literally, I was able to see the design in a different way. Here are some practical exercises to literally shift your perspective: Turn the entire design upside down. While [...]</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2012/01/one-simple-trick-to-find-design-issues/">One simple trick to find design issues</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>Two times in the last few hours I&#8217;ve found areas of a design that could be improved by using one simple trick:</p><p>By shifting my perspective, literally, I was able to see the design in a different way. Here are some practical exercises to literally shift your perspective:</p><ul><li>Turn the entire design upside down. While it may look funny to turn a laptop upside down, it&#8217;s totally doable and allows you to see how a design flows vertically.</li><li>Look at the design on the screen from an extreme angle left or right to see how the design flows horizontally.</li><li>Zoom way in and pixel-peep design. I did this to confirm the baseline was consistent by zooming in and literally holding a ruler to my screen.</li></ul><p>Do you consistently use any of these tricks to help you look at design?</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2012/01/one-simple-trick-to-find-design-issues/">One simple trick to find design issues</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2012/01/one-simple-trick-to-find-design-issues/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>New Business Cards</title><link>http://websitesthatdontsuck.com/2012/01/new-business-cards/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-business-cards</link> <comments>http://websitesthatdontsuck.com/2012/01/new-business-cards/#comments</comments> <pubDate>Thu, 26 Jan 2012 09:22:33 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1326</guid> <description><![CDATA[<p>I just finished my first batch of handmade business cards. I&#8217;m very pleased how they are coming out. I decided that instead of ordering cards, I&#8217;d attempt to hand make them in small batches. This will allow me to tweak, update, or even switch designs as often as I need. These cards have a special [...]</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2012/01/new-business-cards/">New Business Cards</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>I just finished my first batch of handmade business cards. I&#8217;m very pleased how they are coming out.</p><p>I decided that instead of ordering cards, I&#8217;d attempt to hand make them in small batches. This will allow me to tweak, update, or even switch designs as often as I need.</p><p>These cards have a special QR code on the back and my logo heat embossed on the front in either ninja black or line green. They are 2&#8243; square with rounded corners.</p><p><a href="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2012/01/20120126-022218.jpg"><img src="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2012/01/20120126-022218.jpg" alt="20120126-022218.jpg" class="alignnone size-full" /></a></p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2012/01/new-business-cards/">New Business Cards</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2012/01/new-business-cards/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>New version of TDD Progress Bars</title><link>http://websitesthatdontsuck.com/2012/01/new-version-of-tdd-progress-bars/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-version-of-tdd-progress-bars</link> <comments>http://websitesthatdontsuck.com/2012/01/new-version-of-tdd-progress-bars/#comments</comments> <pubDate>Mon, 16 Jan 2012 13:14:56 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1308</guid> <description><![CDATA[<p>Just pushed version TDD-Progress-Bars v0.3 to WordPress/Extend. It incorporates some of the things that I&#8217;ve been meaning to get around to. Widget The progress bars can now be displayed easily in a widgetized sidebar. It&#8217;s a basic implementation using just a text-box to take a comma separated list of progress bar IDs, but it&#8217;ll work [...]</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2012/01/new-version-of-tdd-progress-bars/">New version of TDD Progress Bars</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>Just pushed version <a href="http://wordpress.org/extend/plugins/tdd-progress-bar/">TDD-Progress-Bars v0.3 to WordPress/Extend</a>. It incorporates some of the things that I&#8217;ve been meaning to get around to.</p><p><b>Widget</b><br /> The progress bars can now be displayed easily in a widgetized sidebar. It&#8217;s a basic implementation using just a text-box to take a comma separated list of progress bar IDs, but it&#8217;ll work for now.</p><p><b>New Colors!</b><br /> Two new colors, Black and Silver:<br /> <figure id="attachment_1309"  class="wp-caption aligncenter" style="width: 395px"><a href="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-16-at-5.58.50-AM.png"><img src="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-16-at-5.58.50-AM.png" alt="New progress bar colors: black and silver" title="New progress bar colors" width="385" height="98" class="size-full wp-image-1309" /></a><figcaption class="wp-caption-text">New progress bar colors: silver and black</figcaption></figure></p><p><b>Compatability fixes</b><br /> <a href="http://philoserf.com/">Mark Ayers</a> (@Philoserf) <a href="https://github.com/tddewey/tdd-progress/issues/3">let me know via github</a> that there was an incompatibility with the CSS of this plugin and, well, other things. In this released I&#8217;ve prefixed all my CSS classes so that won&#8217;t be an issue. Also filing that away as a best-practice.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2012/01/new-version-of-tdd-progress-bars/">New version of TDD Progress Bars</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2012/01/new-version-of-tdd-progress-bars/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Taxonomy Archive Pagination 404</title><link>http://websitesthatdontsuck.com/2011/12/taxonomy-archive-pagination-404/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=taxonomy-archive-pagination-404</link> <comments>http://websitesthatdontsuck.com/2011/12/taxonomy-archive-pagination-404/#comments</comments> <pubDate>Sat, 17 Dec 2011 04:15:47 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1301</guid> <description><![CDATA[<p>The issue: When creating a custom taxonomy archive and you want to modify the posts_per_page setting. The first page works just fine, but subsequent pages will take into account the blog&#8217;s posts per page setting. This means that while the first page will show the number of taxonomy terms specified by the &#8220;posts_per_page&#8221; query_posts() variable, [...]</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/12/taxonomy-archive-pagination-404/">Taxonomy Archive Pagination 404</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p><em>The issue:</em><br /> When creating a custom taxonomy archive and you want to modify the posts_per_page setting. The first page works just fine, but subsequent pages will take into account the blog&#8217;s posts per page setting. This means that while the first page will show the number of taxonomy terms specified by the &#8220;posts_per_page&#8221; query_posts() variable, subsequent pages may return a 404 error or just mess up your pagination. This may only be an issue when using a page template such as taxonomy-{$taxonomy}.php</p><p><em>Why this occurs:</em><br /> Specifically, I&#8217;ve no idea. Generally this is because the WordPress query is determining what template to show before it ever gets to the page template. The query takes the number of taxonomy terms to show for a given taxonomy, looks at the blog option posts_per_page and then determines what template to serve (404 or your custom one).</p><p><em>How to fix:</em><br /> The solution I found was to filter the blog option posts_per_page if viewing the custom taxonomy. It&#8217;s pretty simple and looks like this:</p><pre class="brush: php; title: ; notranslate">
add_filter( 'option_posts_per_page', 'tdd_tax_filter_posts_per_page' );
function tdd_tax_filter_posts_per_page( $value ) {
	return (is_tax('custom-taxonomy')) ? 1 : $value;
}
</pre><p>The filter attaches to the posts_per_page filter hook. It then returns a &#8220;1&#8243; for one post per page if it&#8217;s the taxonomy archive I&#8217;m concerned about, otherwise it returns the default value.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/12/taxonomy-archive-pagination-404/">Taxonomy Archive Pagination 404</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2011/12/taxonomy-archive-pagination-404/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>My server doesn&#8217;t hate me anymore thanks to W3 Total Cache</title><link>http://websitesthatdontsuck.com/2011/12/my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache</link> <comments>http://websitesthatdontsuck.com/2011/12/my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache/#comments</comments> <pubDate>Thu, 08 Dec 2011 20:51:00 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1278</guid> <description><![CDATA[<p>After finding serious issues with my VPS running multiple WordPress sites I installed W3 Total Cache and in this post walk through my settings.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/12/my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache/">My server doesn&#8217;t hate me anymore thanks to W3 Total Cache</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>For the better part of yesterday and most of today I&#8217;ve been working on optimizing my websites. I had determined &#8212; using I method I&#8217;ll show you shortly &#8212; that if I had just one person access all of my websites consecutively, my server would crash. Just one person. Here&#8217;s some details about what I&#8217;m running:</p><p>At the time of writing, I was running a <acronym title="Virtual Private Server">VPS</acronym> with guaranteed 600MB per month. The aforementioned websites consisted of approximately 15 WordPress sites of which three had an anecdotally &#8220;intensive&#8221; amount of plugins installed. The server is running PHP5/fcgi and I had enabled x-cache support (but had no idea if it&#8217;s actually running).</p><p>My sites aren&#8217;t popular. Based on my analytics, I&#8217;d estimate about 50 hits per day against my server. Yet, once every few days my server was being automatically restarted because it was using too much memory. Once a client started getting the same thing on their single WordPress site on their server, I decided to start poking around.</p><p>First, I started by looking at the currently running processes and memory usage on my server. I SSH&#8217;d in and &#8212; after reading some DreamHost documentation &#8212; found these commands:</p><p><code>top -c</code></p><p><code>watch free -m</code></p> <figure id="attachment_1293"  class="wp-caption aligncenter" style="width: 462px"><a href="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-08-at-1.41.51-PM.png"><img src="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-08-at-1.41.51-PM.png" alt="" title="results of watch free -m" width="452" height="117" class="size-full wp-image-1293" /></a><figcaption class="wp-caption-text">Results of &quot;watch free -m&quot; command</figcaption></figure><p>The first gave me a running list of the processes on my server. The second just gives a running and easy to see display of total/used/free memory available to my virtual server. So I started opening websites to see what happened. Basically, new processes were spawned every time I refreshed or opened a website and they stayed there, running, for quite some time. I then found this command:</p><p><code>ab -n 1000 -c 20 -t 5 http://websitesthatdontsuck.com/</code></p><p>This code allowed me to simulate high traffic. In this case, 1000 visitors, 20 at a time, wait no more than 5 seconds for a response. Suffice it to say, my server didn&#8217;t handle it well. If I recall, about 10 requests completed, with the remainder failing.</p><p>So I had established the problem, what did I do to fix the problem? <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3-Total-Cache</a>.</p><p><a href="http://websitesthatdontsuck.com/2011/12/my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache/2/" class="button">Setting up W3 Total Cache</a></p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/12/my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache/">My server doesn&#8217;t hate me anymore thanks to W3 Total Cache</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2011/12/my-server-doesnt-hate-me-anymore-thanks-to-w3-total-cache/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>fluid width oEmbed videos in WordPress</title><link>http://websitesthatdontsuck.com/2011/12/fluid-width-oembed-videos-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fluid-width-oembed-videos-in-wordpress</link> <comments>http://websitesthatdontsuck.com/2011/12/fluid-width-oembed-videos-in-wordpress/#comments</comments> <pubDate>Thu, 01 Dec 2011 22:41:01 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1264</guid> <description><![CDATA[<p>Video embedding in a fluid layout is tricky. The videos just don't scale properly. Here's a solution for oEmbeds in WordPress</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/12/fluid-width-oembed-videos-in-wordpress/">fluid width oEmbed videos in WordPress</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>Here&#8217;s the problem: Video elements embedded from YouTube, Vimeo, etc, generally don&#8217;t comply with a max-width:100% declaration in your beautiful fluid-width layout. This is because these embeds are generally presented in an iframe which causes some trickery. Ideally, we could present a javascript-free approach&#8230;</p><p>Note: If you&#8217;ve implemented some type of HTML5 video solution, a simple <code>video{ max-width:100%; height:auto; }</code> will be sufficient and will work wonderfully.</p><p>Luckily, the <a href="http://webdesignerwall.com/tutorials/css-elastic-videos">Web Designer Wall published a method</a> that we&#8217;re going to use. It&#8217;s a fancy bunch of CSS. I&#8217;d just grab it and throw it in your stylesheet.</p><h2>The CSS</h2><pre class="brush: css; title: ; notranslate">
.video-container {
	position: relative;
	padding-bottom: 56.25%;
	padding-top: 30px;
	height: 0;
/*	overflow: hidden; */
}

.video-container iframe,
.video-container object,
.video-container embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
</pre><p><em>edit: The overflow:hidden style was causing my site to cease scrolling (everything outside the viewport was&#8230; hidden?) It didn&#8217;t really make sense, but deleting the line didn&#8217;t seem to have an adverse effect&#8230; for now..</em></p><p>In fact, that&#8217;ll work just fine as long as you wrap some sort of container (such as a <code>&lt;div&gt;</code>) around your oEmbed URL&#8230; But that&#8217;s too much work, the point of oEmbeds is to be super quick and simple.</p><h2>Filter the oEmbed</h2><p>oEmbedding actually runs the URLs it finds through the <kbd></kbd> shortcode and just before it outputs HTML, it applies the embed_oembed_html filter. We can make use of this to very easily wrap a container (as required by the above CSS) and add a layer of semantics by using the HTML5 <code>&lt;figure&gt;</code> tag.</p><pre class="brush: php; title: ; notranslate">
add_filter( 'embed_oembed_html', 'tdd_oembed_filter', 10, 4 ) ;

function tdd_oembed_filter($html, $url, $attr, $post_ID) {
	$return = '&lt;figure class=&quot;video-container&quot;&gt;'.$html.'&lt;/figure&gt;';
	return $return;
}
</pre><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/12/fluid-width-oembed-videos-in-wordpress/">fluid width oEmbed videos in WordPress</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2011/12/fluid-width-oembed-videos-in-wordpress/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>New Plugin: TDD Progress Bars</title><link>http://websitesthatdontsuck.com/2011/11/new-plugin-tdd-progress-bars/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-plugin-tdd-progress-bars</link> <comments>http://websitesthatdontsuck.com/2011/11/new-plugin-tdd-progress-bars/#comments</comments> <pubDate>Fri, 18 Nov 2011 14:47:01 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1257</guid> <description><![CDATA[<p>Need a beautiful and easy to use progress bar for your WordPress site? I just launched this new plugin.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/new-plugin-tdd-progress-bars/">New Plugin: TDD Progress Bars</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>After recently getting around to updating my old <a href="http://wordpress.org/extend/plugins/tdd-recent-posts/">recent posts plugin for WordPress</a> I decided to get cracking at a <em>real</em> plugin.</p><p><div class="tdd_pb_global_container  " style="width:auto"><div title="Post showing off this bar: 33%" class="tdd_pb_bar_container" style="background-color: #333333" role="progressbar" aria-valuenow="33" aria-valuemax="100" aria-valuemin="0"><div class="td_pb_numbers" style="color: #ececec">33%</div><div class="tdd_pb_bar td_pb_lightblue" style="width:33%"></div></div></div><br /> <small>You&#8217;re 33% complete with reading this short post</small></p><p>The result is version 0.1.2 of my progress bar plugin. It&#8217;s somewhat basic for now, but I have plans! For now, you can manage your progress bars and include them, using shortcode, into posts or pages. There are some basic settings to control colors and whatnot, but that&#8217;s about it. In the near future, I hope to add the ability to pull the current progress of any public GitHub project using their API and it would be nice if I could do the same for Trac (though I&#8217;m not sure it&#8217;s possible&#8230;).</p><p><a href="http://wordpress.org/extend/plugins/tdd-progress-bar/" class="button">Get TDD Progress Bars</a></p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/tdd_pb/post-showing-off-this-bar/">Post showing off this bar</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/tdd_pb/post-showing-off-this-bar/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Adding a sub-menu to a custom post type</title><link>http://websitesthatdontsuck.com/2011/11/adding-a-sub-menu-to-a-custom-post-type/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adding-a-sub-menu-to-a-custom-post-type</link> <comments>http://websitesthatdontsuck.com/2011/11/adding-a-sub-menu-to-a-custom-post-type/#comments</comments> <pubDate>Fri, 18 Nov 2011 10:29:26 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1238</guid> <description><![CDATA[<p>Here I add an admin sub-menu to a custom post type. Yeah, it's nerdy.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/adding-a-sub-menu-to-a-custom-post-type/">Adding a sub-menu to a custom post type</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>This is a pretty advanced post, but it was causing me issues for about half an hour, so I thought I&#8217;d share quickly.</p><p>Here&#8217;s the deal: I wanted to add a submenu to an existing custom post type. Right away, when creating a custom post type with <code>public</code> or <code>show_ui</code> set to <code>true</code>, WordPress will create a new top-level menu item, with a submenu item of &#8220;Add <whatever>.&#8221; I wanted to be able to hook into that, and add a new sub-menu item called &#8220;settings&#8221;</p><p>Already in the plugin, I had created a custom post type:</p><pre class="brush: php; title: ; notranslate">
register_post_type( 'tdd_beans', 'tdd_beans_register_post_type' );
</pre><p>The details of my beans post-type are unimportant. What <em>is</em> important is the handle. In all cases, it&#8217;s the first parameter that you pass to <code>register_post_type()</code> &#8212; in this case, <code>beans</code>.</p><pre class="brush: php; title: ; notranslate">
function tdd_beans_menu(){
	add_submenu_page( 'edit.php?post_type=tdd_beans', 'Beans Settings', 'Settings', 'manage_options', 'tdd-beans-settings-menu', 'tdd_beans_view_settings' );
}
add_action( 'admin_menu', 'tdd_pb_beans_menu' );
</pre><p>The <code>add_submenu_page()</code> function takes these parameters:</p><ol><li><code>$parent_slug</code>: The magic is that it requires that whole edit.php whatnot in order to work. At least right now, although I believe that may be a bug in WordPress. Future versions may only require the slug (<code>tdd_beans</code>). In any case, it&#8217;s the slug for the parent page</li><li><code>$page_title</code>: This is what goes between the <code>&lt;title&gt;</code> tags</li><li><code>$menu_title</code>: What shows up in the menu (keep it short)</li><li><code>$capability</code>: This maps to a WordPress capability that will be required to access this sub-menu. It should probably map to whatever the capability is for your custom post type. Sub-menus will continue to display even if their parent menu is unavailable due to permissions</li><li><code>$menu_slug</code>: Put your own menu slug here for referencing this menu item elsewhere.</li><li><code>$function</code>: Lastly, this is the function that will echo stuff to the page.</li><pre class="brush: php; title: ; notranslate">
function tdd_beans_view_settings(){
 echo '&lt;div class=&quot;wrap&quot;&gt;&lt;h2&gt;Hello World (inc. beans)&lt;/h2&gt;&lt;/div&gt;';
}
</pre><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/adding-a-sub-menu-to-a-custom-post-type/">Adding a sub-menu to a custom post type</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2011/11/adding-a-sub-menu-to-a-custom-post-type/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Wireframe stencils full of old-school win</title><link>http://websitesthatdontsuck.com/2011/11/wireframe-stencils-full-of-old-school-win/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wireframe-stencils-full-of-old-school-win</link> <comments>http://websitesthatdontsuck.com/2011/11/wireframe-stencils-full-of-old-school-win/#comments</comments> <pubDate>Mon, 14 Nov 2011 12:37:17 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1226</guid> <description><![CDATA[<p>There are tons of online wireframe and mockup tools, but putting together a wireframe in any of the many online wireframing tools has one, big problem for me...</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/wireframe-stencils-full-of-old-school-win/">Wireframe stencils full of old-school win</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>I joke about these awesome metal wireframe and mockup stencils being old school like anyone was designing websites in the hayday of engineering stencils and whatnot. But putting together a wireframe in any of the many online wireframing tools has one, big problem for me&#8230;</p> <figure id="attachment_1227"  class="wp-caption aligncenter" style="width: 716px"><a href="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/11/UiStencilKitiPhone.jpg"><img src="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/11/UiStencilKitiPhone.jpg" alt="" title="UiStencilKitiPhone" width="706" height="349" class="size-full wp-image-1227" /></a><figcaption class="wp-caption-text">Beautiful iPhone stencil kit from UI Stencils</figcaption></figure><p>They&#8217;re online, in front of a computer screen. (That&#8217;s actually two problems, but whatever). That&#8217;s a problem (for me) for a number of reasons. Distractions is one obvious one, online/offline is another, and my last &#8220;issue&#8221; is somewhat of an intangible.</p><p>I can easily find myself distracted by Facebook, email, and the 27,000 open browser tabs. It&#8217;s not a question of willpower &#8212; when I&#8217;m <em>doing</em> there is no issue. The distraction pops up when I&#8217;m thinking, trying to solve a problem, drawing inspiration. Once that happens&#8230; In fact, I&#8217;m working in the WordPress distraction-free mode right now, with my browser full-screened. So, working with a stencil kit, on grid paper, will help ideas flow more easily.</p><p><figure id="attachment_1228"  class="wp-caption alignright" style="width: 310px"><a href="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/11/WebsiteStencilKitStencilUi.jpg"><img src="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/11/WebsiteStencilKitStencilUi-300x148.jpg" alt="" title="WebsiteStencilKitStencilUi" width="300" height="148" class="size-medium wp-image-1228" /></a><figcaption class="wp-caption-text">Beautiful metal stencil for hand-drawn awesomesauce</figcaption></figure>The second issue is the need to be online. One of my favorite places to draw inspiration is the outdoors, nature. Or maybe that&#8217;s just where I can breathe easy. Whatever the case, it is somewhat inappropriate to pull out a laptop. Hippyism aside, it&#8217;s also much more conference-table, dinner table friendly.</p><p>Finally, while it may be a bit hipster, I think working a wireframe on a computer isn&#8217;t limiting enough. The constraining medium of paper allows me to just work, moving from element to element, jotting quick notes in the margin, free-form random arrows from place to place. Not only can I work in a way that mirrors how I think, but also in a way that frees me from perfection. It&#8217;s impossible to be pixel perfect on wood fiber&#8230; even recycled ones.</p><p>So I&#8217;ve purchased the <a href="http://www.uistencils.com/products/website-stencil-kit">UI stencil kit for browsers</a>, iPhone (to represent mobile in general), and some of their sketch books from <a href="http://UIStencils.com">UIStencils.com</a>. I&#8217;ll try to revisit this post after I&#8217;ve had some time with them and see if what I&#8217;ve written here still holds true.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/wireframe-stencils-full-of-old-school-win/">Wireframe stencils full of old-school win</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2011/11/wireframe-stencils-full-of-old-school-win/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>H5BP a fancy acronym, a fancy way to design</title><link>http://websitesthatdontsuck.com/2011/11/h5bp-a-fancy-acronym-a-fancy-way-to-design/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=h5bp-a-fancy-acronym-a-fancy-way-to-design</link> <comments>http://websitesthatdontsuck.com/2011/11/h5bp-a-fancy-acronym-a-fancy-way-to-design/#comments</comments> <pubDate>Wed, 09 Nov 2011 18:30:46 +0000</pubDate> <dc:creator>tddewey</dc:creator> <category><![CDATA[articles]]></category><guid isPermaLink="false">http://websitesthatdontsuck.com/?p=1156</guid> <description><![CDATA[<p>The HTML 5 Boilerplate is a fantastic bit 'o code to get started designing modern websites. Combined with the 320 and Up "mobile-first" development ideas, it's quite powerful. Unfortunately, it doesn't work well as a WordPress theme starter -- especially not if you intend on using the included (and awesome) build script. So, while designing this site, I created my own version of H5BP that *does* work well with WordPress.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/h5bp-a-fancy-acronym-a-fancy-way-to-design/">H5BP a fancy acronym, a fancy way to design</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></description> <content:encoded><![CDATA[<p>H5BP is a weird pseduo-acronym for the <a href="http://html5boilerplate.com/">HTML 5 Boilerplate</a>. It&#8217;s a way to get started designing a site in a way that utilizes the most forward (and backward) compatible code possible and has an ear to some extreme optimization. It&#8217;s also what I used to design this site, well, sorta.</p> <figure id="attachment_1157"  class="wp-caption aligncenter" style="width: 310px"><a href="http://html5boilerplate.com/"><img src="http://wtds-cdn.s3.amazonaws.com/wp-content/uploads/2011/11/Screen-Shot-2011-11-09-at-11.14.39-AM-300x48.png" alt="" title="Screen Shot 2011-11-09 at 11.14.39 AM" width="300" height="48" class="size-medium wp-image-1157" /></a><figcaption class="wp-caption-text">HTML 5 Boilerplate</figcaption></figure><p>If you&#8217;re not familiar with H5BP, part of its deal is that it has what&#8217;s called a build script included. This build script runs through your stylesheets, html (or php) files, javascript, and images and compresses the heck out of them. In fact, it also combines javascript and stylesheets so that you can minimize HTTP requests. You run the build script once, from the command line, which results in a &#8220;publish&#8221; folder that you can upload.</p><p>Thing is, it doesn&#8217;t work well with WordPress themes. At least not right away. WordPress expects files (like style.css) to be in certain places and include certain information. WordPress also has some default styles that should be included, and it requires some extra work to play nicely with jQuery.</p><p>So, while creating this site, I&#8217;ve started building my own theme starter based on H5BP. You can check it out on <a href="https://github.com/tddewey/tdd-theme-starter/">GitHub</a> &#8212; feel free to download your own copy, clone it, or contribute. It&#8217;s not really a &#8220;regular&#8221; WordPress theme, so it&#8217;s unlikely I&#8217;ll ever offer it through extend.</p><p>My version of the H5BP also includes some concepts from 320 and Up &#8212; in that I think a mobile-first development cycle makes sense. The default stylesheet (default-styles.css) is designed to set the styles for a 320px wide browser (i.e. iPhone in portrait) with more styles included as the screen size gets bigger.</p><p>--------- Thanks for reading <a href="http://websitesthatdontsuck.com/2011/11/h5bp-a-fancy-acronym-a-fancy-way-to-design/">H5BP a fancy acronym, a fancy way to design</a> on <a href="http://websitesthatdontsuck.com">Taylor D Dewey - Designing Websites That Don&#039;t Suck Since 1998</a></p>]]></content:encoded> <wfw:commentRss>http://websitesthatdontsuck.com/2011/11/h5bp-a-fancy-acronym-a-fancy-way-to-design/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using xcache
Page Caching using xcache
Database Caching 1/21 queries in 0.070 seconds using xcache
Object Caching 1320/1368 objects using xcache
Content Delivery Network via Amazon Web Services: S3: wtds-cdn.s3.amazonaws.com

Served from: websitesthatdontsuck.com @ 2012-02-22 17:05:00 -->
