<?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>Derek Punsalan - 5THIRTYONE &#187; layout</title> <atom:link href="http://5thirtyone.com/archives/tag/layout/feed" rel="self" type="application/rss+xml" /><link>http://5thirtyone.com</link> <description>A personal site by Derek Punsalan sharing personal interests with technology, WordPress, design, and general geekery.</description> <lastBuildDate>Wed, 28 Jul 2010 19:35:03 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Get your grid on, Gridmaker for Photoshop CS4</title><link>http://5thirtyone.com/archives/2016</link> <comments>http://5thirtyone.com/archives/2016#comments</comments> <pubDate>Fri, 27 Feb 2009 15:23:47 +0000</pubDate> <dc:creator>Derek</dc:creator> <category><![CDATA[Breadcrumbs]]></category> <category><![CDATA[cs4]]></category> <category><![CDATA[design]]></category> <category><![CDATA[extension]]></category> <category><![CDATA[grid]]></category> <category><![CDATA[layout]]></category> <category><![CDATA[photoshop]]></category> <category><![CDATA[plugin]]></category><guid
isPermaLink="false">http://5thirtyone.com/?p=2016</guid> <description><![CDATA[Built on top of the popular 960.gs grid, Gridmaker for Photoshop CS4 provides you with a small configurable panel for building your grids right inside Photoshop. Readers Also ReadWordPress Custom Fields; laying text over your lead graphicFix Photoshop CS3 missing scratch disk problem in OS XDog owners? Have you witnessed your best friend do this?Minimalist [...]]]></description> <content:encoded><![CDATA[<p>Built on top of the popular <a
href="http://www.andrewingram.net/articles/gridmaker_for_photoshop_cs4/960.gs">960.gs grid</a>, Gridmaker for Photoshop CS4 provides you with a small configurable panel for building your grids right inside Photoshop.</p><div
id="wherego_related"><h3>Readers Also Read</h3><ul><li><a
href="http://5thirtyone.com/archives/875" rel="bookmark" class="wherego_title">WordPress Custom Fields; laying text over your lead graphic</a></li><li><a
href="http://5thirtyone.com/archives/903" rel="bookmark" class="wherego_title">Fix Photoshop CS3 missing scratch disk problem in OS X</a></li><li><a
href="http://5thirtyone.com/archives/2017" rel="bookmark" class="wherego_title">Dog owners? Have you witnessed your best friend do this?</a></li><li><a
href="http://5thirtyone.com/archives/2187" rel="bookmark" class="wherego_title">Minimalist Gmail</a></li><li><a
href="http://5thirtyone.com/archives/1447" rel="bookmark" class="wherego_title">GridFox</a></li></ul></div>]]></content:encoded> <wfw:commentRss>http://5thirtyone.com/archives/2016/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>WordPress Custom Fields; laying text over your lead graphic</title><link>http://5thirtyone.com/archives/875</link> <comments>http://5thirtyone.com/archives/875#comments</comments> <pubDate>Mon, 24 Dec 2007 00:41:22 +0000</pubDate> <dc:creator>Derek</dc:creator> <category><![CDATA[Tutorial]]></category> <category><![CDATA[custom]]></category> <category><![CDATA[design]]></category> <category><![CDATA[images]]></category> <category><![CDATA[layout]]></category> <category><![CDATA[theme]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://5thirtyone.com/archives/875</guid> <description><![CDATA[For WordPress users, there are certain scenarios when the typical reverse chronological presentation of content is just not enough. I have experimented with different methods of presenting content on 5thirtyone.com each time a redesign is uploaded &#8211; from the text-centric to the image heavy version in use right now. With hundreds of WordPress driven blogs [...]]]></description> <content:encoded><![CDATA[<p>For <a
href="http://www.wordpress.org/">WordPress</a> users, there are certain scenarios when the <em>typical reverse chronological presentation of content is just not enough</em>. I have experimented with different methods of presenting content on <a
href="http://5thirtyone.com/">5thirtyone.com</a> each time a redesign is uploaded &#8211; from the text-centric to the image heavy version in use right now. With hundreds of WordPress driven blogs being published on a daily basis, it&#8217;s difficult to stand out; even more so if you stick to the standard two-column blog layout.</p><p>The general consensus or recommendation is for users to either a) invest some time into learning the underlying architecture of WordPress in order to create or modify a theme, or b) invest some money for a one-off custom theme. The latter may not sound too appealing for the beginner or casual blogger, so modifying an existing theme like <a
href="http://5thirtyone.com/grid-focus">Grid Focus</a> or <a
href="http://5thirtyone.com/archives/703">October Special</a> might be a good place to start.</p><h3>How can I create a blog without the typical blog layout?</h3><p>A typical blog landing page is comprised of noticeably sized chunks of text differentiated by a catchy titles and [possibly] a few inline images.</p><p
align="center"><img
src="http://5thirtyone.com/wp-content/uploads/2007/12/general-wordpress.gif" alt="Generic WordPress default theme" /></p><p>The typical two-column blog layout works but is used so often that new visitors may slowly blur the lines differentiating your blog from the previous. Sure, you could brighten the page with a few inline post images, but why not step it up a little with <a
href="http://codex.wordpress.org/Using_Custom_Fields">WordPress Custom Fields</a>.</p><h3>What are WordPress Custom Fields?</h3><p>A WordPress post is comprised of the following:</p><ul><li>Title</li><li>Content &#8211; text &amp; images</li><li>Categories</li><li>Tags (if you&#8217;re running WordPress 2.3+)</li></ul><p>Think of <a
href="http://codex.wordpress.org/Using_Custom_Fields">WordPress Custom Fields</a> as extra &quot;containers&quot; of data that can be associated with a post &#8211; content that can be called and used within <a
href="http://codex.wordpress.org/The_Loop">The Loop</a>.</p><h3>Custom post title with lead graphic background</h3><p>The first step to setting yourself apart from the rest of the typical title + content blogs is a little style. Adding a photo or image behind a posts title can help to lure a reader into viewing the main excerpt / permalink of your post.</p><p
align="center"><img
src="http://5thirtyone.com/wp-content/uploads/2007/12/sample-lead-title.gif" alt="Sample lead WordPress title" /></p><p>You can achieve a similar effect using <a
href="http://codex.wordpress.org/Using_Custom_Fields">WordPress Custom Fields</a>.</p><p><strong>First</strong>, create the image / photo that you want to use. For the example above, I create a photo of Boo, our Mini Rat Terrier, titled <code>boo-lead-title.gif</code>. Upload the image to your server and save the URI. If you would like the image and post title to span the entire width of your main content column, you&#8217;ll want to create a lead image with a width to match that of your main column. In the standard K2 theme included with WordPress, that width is <code>450px</code>.</p><p
align="center"><img
src="http://5thirtyone.com/wp-content/uploads/2007/12/custom-field-screenshot.gif" alt="Custom Field Screenshot" /></p><p><strong>Second</strong>, compose a new post. Before saving, scroll towards the bottom of the editor pane and add a new Custom Field in the &#8216;Key&#8217; field. In the example, I created a Custom Field titled <code>lead_image</code>. Paste the previously saved URI in the &#8216;Value&#8217; field. Save the post &#8211; do not publish yet.</p><p><strong>Third</strong>, open the <code>index.php</code> file in your themes directory and find the line beginning with <code>&lt;?php if (have_posts()) : ?&gt;</code>. If you are using the default theme, the area of the file we will be editing can be found below:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;post&quot; id=&quot;post-<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title_attribute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;entry&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Read the rest of this entry'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&lt;p class=&quot;postmetadata&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_tags<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Tags: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> Posted in <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> | <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' | '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_popup_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Comments'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1 Comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Comments'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>Having previously created a Custom Field called <code>lead_image</code>, we can now call that image from within The Loop. Changes to the above code are in bold below:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;post&quot; id=&quot;post-<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;div class=&quot;lead-image-wrapper&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title_attribute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h2&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$image</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;lead_image&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$image</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;entry&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Read the rest of this entry'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&lt;p class=&quot;postmetadata&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_tags<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Tags: '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">', '</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> Posted in <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> | <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Edit'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">', '</span> <span style="color: #339933;">|</span> <span style="color: #0000ff;">'); ?&gt; &lt;?php comments_popup_link('</span>No Comments<span style="color: #0000ff;">', '</span><span style="color: #cc66cc;">1</span> Comment<span style="color: #0000ff;">', '</span><span style="color: #339933;">%</span> Comments<span style="color: #0000ff;">'); ?&gt;</span>&lt;/p&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div><p>Notice that both the <code>php</code> function and post title are wrapped by a new <code>div</code> with a class <code>lead-image-wrapper</code>. Also notice that the title <code>h2</code> is loaded before the image.</p><p><strong>Fourth</strong>, add the following to your <code>style.css</code>.</p><div
class="wp_syntax"><div
class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.lead-image-wrapper</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.lead-image-wrapper</span> h2 <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">28px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.lead-image-wrapper</span> h2 a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.lead-image-wrapper</span> img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> xxxpx<span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> xxxpx<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div><p>In order to ensure that the styles are applied, you can either a) remove any previous styles associated with the <code>h2</code> tags loaded on the index page, or b) place the code at the bottom of the stylesheet overriding any previous code &#8211; <a
href="http://www.w3.org/Style/CSS/">Cascading Style Sheets</a>.</p><ul><li>A background color is specified for <code>.lead-image-wrapper</code> in case your image fails to load. Because the title link is white, you want to ensure that the parent element has a background color for readability.</li><li>The title link is positioned absolute relative to the parent element <code>.lead-image-wrapper</code>. Adjust the positioning accordingly for your image.</li><li>Always set a height or width for images &#8211; make <code>.lead-image-wrapper img</code> match the dimensions of the lead_image you have uploaded.</li></ul><p><strong>Fifth</strong>, experiment, experiment, experiment. Part of the learning process is learning by trial and error. Feel free to use the comments for help or feedback.</p><div
id="wherego_related"><h3>Readers Also Read</h3><ul><li><a
href="http://5thirtyone.com/archives/117" rel="bookmark" class="wherego_title">Chrondata customization quickie</a></li><li><a
href="http://5thirtyone.com/archives/2018" rel="bookmark" class="wherego_title">&#8220;The future of WordPress themes&#8221;, what do you think?</a></li><li><a
href="http://5thirtyone.com/archives/877" rel="bookmark" class="wherego_title">Planning on carrying the momentum, 2007 to 2008</a></li><li><a
href="http://5thirtyone.com/archives/2117" rel="bookmark" class="wherego_title">The Unstandard theme update with new options page</a></li><li><a
href="http://5thirtyone.com/archives/703" rel="bookmark" class="wherego_title">Update: Widgetized October Special WordPress theme</a></li></ul></div>]]></content:encoded> <wfw:commentRss>http://5thirtyone.com/archives/875/feed</wfw:commentRss> <slash:comments>56</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 14/25 queries in 0.027 seconds using disk

Served from: 5thirtyone.com @ 2010-07-30 05:10:25 -->