<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Bold Perspective » Code Snippets</title>
	
	<link>http://boldperspective.com</link>
	<description>San Antonio Web Design</description>
	<lastBuildDate>Wed, 09 Jan 2013 20:07:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!--built on the Whiteboard Framework-->
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BoldPerspectiveForTheDeveloper" /><feedburner:info uri="boldperspectiveforthedeveloper" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>How to use WordPress Shortcode</title>
		<link>http://feedproxy.google.com/~r/BoldPerspectiveForTheDeveloper/~3/5KxjO-DVwmI/</link>
		<comments>http://boldperspective.com/2011/wordpress-shortcode-make-it-easy-for-clients-to-manage-complicated-code-snippets/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 17:56:31 +0000</pubDate>
		<dc:creator>Brian Purkiss</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[For the Designer]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Back-end Development]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shortcode]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress Theme]]></category>

		<guid isPermaLink="false">http://boldperspective.com/?p=1233</guid>
		<description><![CDATA[It&#8217;s a common phenomenon to see a designer&#8217;s website in a design class several levels above that of it&#8217;s clients web design work. While there are many factors that can play into this occurrence, one in particular is very common. Designers/developers know more about code, whereas many clients don&#8217;t try at all to learn any.<a href="http://boldperspective.com/2011/wordpress-shortcode-make-it-easy-for-clients-to-manage-complicated-code-snippets/" class="read-more right"> Continue Reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s a common phenomenon to see a designer&#8217;s website in a design class several levels above that of it&#8217;s clients web design work. While there are many factors that <em>can</em> play into this occurrence, one in particular is very common. Designers/developers know more about code, whereas many clients don&#8217;t try at all to learn any. That is a huge component in making it difficult for those who build WordPress websites to make top notch sites for clients. There are certain site components that require additional code custom to each usage in order to function. Thus, for many jobs, additional code means more advanced components are off limits for client work, limiting the site&#8217;s possibilities. </p>
<p>However, it is possible to use <a href="http://codex.wordpress.org/Shortcode_API">WordPress Shortcode</a> to output complex snippets in a simple manner so that people with no HTML/CSS background can output any pre-determined code snippet. </p>
<p><strong>WordPress Shortcode has a wide variety of applications and can be extremely beneficial for website managers of all ranges of technical backgrounds.</strong></p>
<h3>What is WordPress Shortcode?</h3>
<p><em>Example 1</em></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">[container]Lorem ipsum dolar sit amet[/container]</pre></td></tr></table></div>

<p>With that shortcode, you can output whatever you want on your WordPress website. You can build anything – any amont of HTML, CSS, Javascript, PHP, or anything else you may want. The possibilities are endless.</p>
<div class="line-x"></div>
<p><em>Example 2</em></p>
<p>The simplest, yet most overlooked, example of using WordPress Shortcode can be extremely complex.</p>
<p><strong>This:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">[donate]</pre></td></tr></table></div>

<p><strong>Can output this:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;/donate/&quot; class=&quot;donate-button&quot;&gt;Donate!&lt;/a&gt;</pre></td></tr></table></div>

<p>This simple technique can output pre-built complex, or simple, code snippets. This one is great for having pre-built content areas that are used on multiple pages and/or articles. It&#8217;s less code to maintain and allows you to update all of the pages by editing a single code snippet. Very similar to WordPress&#8217; file structure, but this format gives you more versatility and applications.</p>
<div class="line-x"></div>
<p><em>Example 3</em></p>
<p>The most common example of WordPress&#8217; Shortcode can be derived from <a href="http://en.wikipedia.org/wiki/BBCode" rel="nofollow">BBCode</a>.</p>
<p><strong>This:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">[img title=&quot;Example Logo&quot;]http://example.com/images/logo.png[/img]</pre></td></tr></table></div>

<p><strong>Can output this:</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;http://example.com/images/logo.png&quot; alt=&quot;Example Logo&quot; /&gt;</pre></td></tr></table></div>

<p>BBCode, a different form of WordPress Shortcode, uses the above snippet to output an image. While this isn&#8217;t all that different than the <img> tag, it is simpler enough that, as a general rule, website managers who aren&#8217;t very technically savvy have an easier time grasping this than html.</p>
<p>Even though it&#8217;s an extremely simple concept, the possibilities are endless and <strong>WordPress shortcode can open up a whole new world for your client work</strong>.</p>
<h3>How to use WordPress Shortcode</h3>
<p>Example 2 is the simplest version of WordPress Shortcode to execute.</p>
<p>Copy and Paste this onto your WordPress Theme&#8217;s functions.php file:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> donatebutton<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;a href=&quot;/donate/&quot; class=&quot;donate-button&quot;&gt;Donate!&lt;/a&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'donate'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'donatebutton'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Use this in your WordPress post/page&#8217;s content:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">[donate]</pre></td></tr></table></div>

<p>The HTML output will be this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;/donate/&quot; class=&quot;donate-button&quot;&gt;Donate!&lt;/a&gt;</pre></td></tr></table></div>

<p>Using a simple &#8220;[foo-bar]&#8221; can output an entire content block across multiple pages, making it easy to update.</p>
<div class="line-x"></div>
<p>More of a blockquote style usage of WordPress Shortcode, like in the first example, requires a little extra, but is still extremely easy to execute.</p>
<p>Copy and Paste this onto your WordPress Theme&#8217;s functions.php file:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> postrecap<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;span class=&quot;recap&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;recap&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;postrecap&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Use this in your WordPress post/page&#8217;s content:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">[recap]A bit of text content[/recap]</pre></td></tr></table></div>

<p>The HTML output will be this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;span class=&quot;recap&quot;&gt;A bit of text content&lt;/span&gt;</pre></td></tr></table></div>

<div class="line-x"></div>
<p>This exact code snippet was used on one of our client&#8217;s WordPress sites, <a href="http://boldperspective.com/2011/agendawise-a-news-website-case-study/">AgendaWise</a>, to great effect and made the blog a lot easier to maintain. This allows the client to use a pre-built-custom blockquote, and cite someone with unique and consistant styling. It automatically detects if there&#8217;s a name and/or url being referenced. If there&#8217;s a name and a url, the WordPress Shortcode adds a styled link at the end of the quote, and if there&#8217;s a name but no url, it just adds a styled name at the bottom of the blockquote.</p>
<p>Use any of these in your WordPress post/page&#8217;s content:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">[blockquote]Test content.[/blockquote]
&nbsp;
[blockquote cite=&quot;John Doe&quot;]Test content.[/blockquote]
&nbsp;
[blockquote cite=&quot;John Doe&quot; url=&quot;http://example.com/&quot;]Test Content[/blockquote]</pre></td></tr></table></div>

<p>Copy and Paste this onto your WordPress Theme&#8217;s functions.php file:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> bc<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">&quot;cite&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Unknown'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;url&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'url'</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$cite</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'Unknown'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;blockquote class=&quot;bc-full&quot;&gt;&lt;p&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;/blockquote&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'url'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;blockquote class=&quot;bc-full&quot;&gt;&lt;p&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;p class=&quot;bc-cite&quot;&gt;- '</span><span style="color: #339933;">.</span><span style="color: #000088;">$cite</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;/blockquote&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;blockquote class=&quot;bc-full&quot;&gt;&lt;p&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;p class=&quot;bc-cite&quot;&gt;- &lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$cite</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;blockquote&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;bc&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The HTML output will any of these, respectively:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html" style="font-family:monospace;">&lt;blockquote class=&quot;bc-full&quot;&gt;&lt;p&gt;Test content.&lt;/p&gt;&lt;/blockquote&gt;
&nbsp;
&lt;blockquote class=&quot;bc-full&quot;&gt;&lt;p&gt;Test content.&lt;/p&gt;&lt;p class=&quot;bc-cite&quot;&gt;-John Doe&lt;/p&gt;&lt;/blockquote&gt;
&nbsp;
&lt;blockquote class=&quot;bc-full&quot;&gt;&lt;p&gt;Test content.&lt;/p&gt;&lt;p class=&quot;bc-cite&quot;&gt;- &lt;a href=&quot;http://example.com&quot;&gt;John Doe&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</pre></td></tr></table></div>

<p>This technique could be very well combined with some of the concepts in <em>example 2</em>. Say, if you were to have a blog with multiple authors, you could use <em>[twitter handle="brianpurkiss"]</em> to output a custom styled Twitter follow button that plugs in the specified twitter handle. Again, the possibilites are endless.</p>
<h4>Wrap Up</h4>
<p>WordPress&#8217; Shortcode has vast amounts of untapped possibilities. It is extremely beneficial in allowing clients to add more complex content areas with no technical knowledge and great ease. It can even be beneficial for those with lots of technical knowledge to better manage duplicate content areas. </p>
<p><strong>Make website management easier – use WordPress Shortcode.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://boldperspective.com/2011/wordpress-shortcode-make-it-easy-for-clients-to-manage-complicated-code-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boldperspective.com/2011/wordpress-shortcode-make-it-easy-for-clients-to-manage-complicated-code-snippets/</feedburner:origLink></item>
		<item>
		<title>How to Use @font-face</title>
		<link>http://feedproxy.google.com/~r/BoldPerspectiveForTheDeveloper/~3/MrpnGLQ4NJg/</link>
		<comments>http://boldperspective.com/2011/how-to-use-css-font-face/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 17:16:21 +0000</pubDate>
		<dc:creator>Brian Purkiss</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[For the Designer]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[Cross-Browser]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Font]]></category>
		<category><![CDATA[Web Typography]]></category>

		<guid isPermaLink="false">http://boldperspective.com/?p=241</guid>
		<description><![CDATA[For years web designers struggled with Web Typography. We were stuck with a small number of &#8220;web safe&#8221; fonts, seriously limiting the typographic quality of the websites we designed. For the longest time virtually the only way to use a non-web-safe font was via an image or flash &#8211; both of which are far from<a href="http://boldperspective.com/2011/how-to-use-css-font-face/" class="read-more right"> Continue Reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><strong>For years web designers struggled with Web Typography.</strong> We were stuck with a small number of &#8220;<a href="http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html">web safe</a>&#8221; fonts, seriously limiting the typographic quality of the websites we designed. For the longest time virtually the only way to use a non-web-safe font was via an image or flash &#8211; both of which are far from ideal and couldn&#8217;t let web designers do what we wanted to with our many beautiful fonts.</p>
<h3>A New Age in Web Typography</h3>
<p>With huge leaps in browser capabilities, beautiful web typography is finally a reality. Services like <a href="http://typekit.com/">Typekit</a> and free services like <a href="http://www.google.com/webfonts">Google Web Fonts</a>, <a href="http://www.fontsquirrel.com/">Font Squirrel</a>, and <a href="http://webfonts.fonts.com/">webfonts.fonts.com</a> allow web designers and type enthusiasts to finally be able to use the fonts we want. <strong>CSS&#8217;s @font-face is where web typography is quickly headed.</strong> The web&#8217;s typographic future is certainly looking beautiful.</p>
<h2 class="gigantic">How to Use @font-face</h2>
<p><strong>@font-face is without a doubt the best option for web designers</strong> to create beautiful web typography. Not only is @font-face flat out amazing, is incredibly simple to use. It only requires a few lines of CSS and then declare the font-family just like you would any other font on the web.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> web-font<span style="color: #00AA00;">,</span> fallback-fonts<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
strong <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> web-font-bold<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
em <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> web-font-italic<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #a1a100;">@font-face {</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'web-font'</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font.eot?'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font.woff'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'woff'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font.ttf'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'truetype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font.svg'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'svg'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #a1a100;">@font-face {</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'web-font-bold'</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-italic.eot?'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-italic.woff'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'woff'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-italic.ttf'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'truetype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-italic.svg'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'svg'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #a1a100;">@font-face {</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'web-font-italic'</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-bold.eot?'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-bold.woff'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'woff'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-bold.ttf'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'truetype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'web-font-bold.svg'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'svg'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Due to average @font-face font file sizes and to keep load time to a minimum, we recommend at the absolute most, only using five fonts via @font-face but three or lower is a more realistic and ideal number.</p>
<p>For full cross browser compatibility with @font-face, make sure you use each of the web font formats &#8211; .eot, .woff, .ttf, and .svg. The file formats required for @font-face can be generated on <a href="http://www.fontsquirrel.com/fontface/generator" rel="nofollow">FontSquirrel.com&#8217;s @font-face Generator</a>.</p>
<h3>CSS @font-face in Action</h3>
<p>Bold Perspective itself uses @font-face for <a href="http://www.fontsquirrel.com/fonts/eb-garamond">Garamond</a>, the serif font scattered about. Take a look at the <a href="http://boldperspective.com/demos/jokal/">Jokal Demo</a>, <a href="http://abberdein.com/">Abberdein</a>, or <a href="http://lostworldsfairs.com/">Lost World&#8217;s Fairs</a> for other great examples of @font-face in action.</p>
<h4>CSS @font-face Cross Browser Compatibility</h4>
<p><strong>@font-face is <em>completely</em> cross browser compatible</strong> with all major web browsers as well as most less popular web browsers. Surprisingly, @font-face has been around for a while and is even supported by old versions of IE. <sup><a href="http://webfonts.info/wiki/index.php?title=%40font-face_browser_support" rel="nofollow">*</a></sup><br />
<img src="/wp-content/uploads/2011/04/browsers.png" class="right" alt="Cross Browser Compatability" />
<ul>
<li>Internet Explorer 4+</li>
<li>Chrome 4+</li>
<li>Mozilla/Firefox 3.5+</li>
<li>Safari/iOS 3.1+</li>
<li>Opera 10+</li>
</ul>
<h3>Obtaining Fonts to use with CSS @font-face</h3>
<p>The main reason it took @font-face so long to become popular was not due to cross-browser compatibility, but was primarily due to licensing issues. Most type foundries were reluctant to release @font-face licenses for their very expensive font families. Now that type foundries have finally come around, there are a wide variety of inexpensive or free ways to obtain @font-face licenses.</p>
<p><a href="http://boldperspective.com/labs/geocon/" class="right img-link" style="margin-left:10px;"><img src="http://boldperspective.com/wp-content/uploads/2011/04/geocon-light-sm.png" alt="GeoCon Light" /></a>Inexpensive Web Fonts: <a href="http://boldperspective.com/labs/geocon/"><strong>GeoCon Light</strong></a>, <a href="http://www.fontsquirrel.com/">Font Squirrel</a>, <a href="http://fontdeck.com/">Font Deck</a>, <a href="http://www.fontspring.com/">Font Spring</a>, <a href="http://typekit.com/">Typekit</a></p>
<p>Free Web Fonts: <a href="http://boldperspective.com/labs/jokal-a-free-font-webfont/"><strong>Jokal</strong></a>, <a href="http://clumsy.kylesteed.com/">Clumsy</a>, <a href="http://www.exljbris.com/">Exljbris Font Foundry</a>, <a href="http://www.theleagueofmoveabletype.com/fonts/1-junction">Junction</a>, <a href="http://www.vissol.co.uk/mavenpro/">Maven Pro</a>, <a href="http://www.google.com/webfonts">Google Web Fonts</a></p>
<p><strong>Making your own Web Font for use with CSS @font-face:</strong><br />
Making your own font is an incredibly time consuming and difficult undertaking. But, if you persevere and make a web font, the wonderful boys at <a href="http://www.fontsquirrel.com/">Font Squirrel</a> have made it very easy to turn your font into the formats required for @font-face.<br />
<a href="http://www.fontsquirrel.com/fontface/generator">Make your own @font-face set</a></p>
<h4>Optimizing Web Typography and @font-face</h4>
<ul class="big">
<li><a href="http://letteringjs.com/">Lettering.js</a> &#8211; Kerning Type on the Web, great for fine tuning your @font-face fonts</li>
<li><a href="http://fittextjs.com/">Fit Text JS</a> &#8211; get your typography to fit full width within a container</a></li>
<li><a href="http://boldperspective.com/2011/improve-web-typography-with-1-line-of-code/">Using Text-Shadows to improve web typography</a></li>
<li><a href="http://wordmark.it/">Wordmark.it</a> &#8211; Test Fonts in your Web Browser</li>
<li><a href="http://chengyinliu.com/whatfont.html">WhatFont Bookmarklet</a> &#8211; Identify typefaces, font-sizes, and line height while browsing</li>
<li><a href="http://www.typetester.org/">Typesetter</a> &#8211; compare font family, font sizes, line height, color, and more side-by-side</li>
<li><a href="http://www.google.com/webfonts">Google Web Fonts</a> &#8211; a quickly growing free @font-face library</ul>
<h4>Wrap Up</h4>
<p>We hope you have fount this article and these resources on CSS @font-face useful. If you have any questions or wish to add some tips, @font-face resources, or @font-face fonts, please <span class="contact link">contact us</span> or <a href="http://twitter.com/perspectivebold/" rel="nofollow">hit is up on Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://boldperspective.com/2011/how-to-use-css-font-face/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boldperspective.com/2011/how-to-use-css-font-face/</feedburner:origLink></item>
		<item>
		<title>Improve Web Typography with 1 Line of CSS</title>
		<link>http://feedproxy.google.com/~r/BoldPerspectiveForTheDeveloper/~3/k-V8oPvklzk/</link>
		<comments>http://boldperspective.com/2011/improve-web-typography-with-1-line-of-code/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 14:42:44 +0000</pubDate>
		<dc:creator>Brian Purkiss</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[text-shadow]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Web Typography]]></category>

		<guid isPermaLink="false">http://50.22.112.192/~bold/?p=65</guid>
		<description><![CDATA[Web typography has been a long and difficult struggle for designers these past few years. With new technologies like @font-face, web typography has taken leaps and bounds forward. However, we have those pesky Windows computers still poorly rendering type on the web. Looking closely, particularly at the PC-Firefox rendering, you clearly see that Mac-Chrome renders<a href="http://boldperspective.com/2011/improve-web-typography-with-1-line-of-code/" class="read-more right"> Continue Reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Web typography has been a long and difficult struggle for designers these past few years. With new technologies like @font-face, web typography has taken leaps and bounds forward. However, we have those pesky Windows computers still poorly rendering type on the web.</p>
<p class="tcenter"><img src="http://50.22.112.192/~bold/wp-content/uploads/2011/04/pc-mac-chrome-firefox-type-rendering-comparison.png" alt="Web Typography" /></p>
<p>Looking closely, particularly at the PC-Firefox rendering, you clearly see that Mac-Chrome renders web typography the best. While there aren&#8217;t any magical hacks to fix Windows, we can add a little bit of non-intrusive CSS to improve the rendering of text across all browsers and operating systems, particularly on Windows machines. Unfortunately the always dated Internet Explorer (8 and below) doesn&#8217;t support text-shadow, so there&#8217;s nothing we can do to help IE. But a little help is better than nothing.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">1px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.1<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> -webkit-text-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.1<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> -moz-text-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span>.1<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://boldperspective.com/2011/improve-web-typography-with-1-line-of-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boldperspective.com/2011/improve-web-typography-with-1-line-of-code/</feedburner:origLink></item>
		<item>
		<title>SEO Friendly Dynamic &lt;title&gt; for WordPress</title>
		<link>http://feedproxy.google.com/~r/BoldPerspectiveForTheDeveloper/~3/ErApqKVLc4k/</link>
		<comments>http://boldperspective.com/2011/seo-friendly-dynamic-for-wordpress/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 15:23:42 +0000</pubDate>
		<dc:creator>Brian Purkiss</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://50.22.112.192/~bold/?p=57</guid>
		<description><![CDATA[Using a good &#60;title&#62; tag is incredibly important for ranking high in the Search Engines. This code will dynamically generate a dynamic &#60;title&#62; tag to improve your WordPress site&#8217;s SEO. &#60;title&#62;&#60;?php if &#40; is_category&#40;&#41; &#41; &#123; echo 'Category Archive for &#38;quot;'; single_cat_title&#40;&#41;; echo '&#38;quot; &#124; '; bloginfo&#40; 'name' &#41;; &#125; elseif &#40; is_tag&#40;&#41; &#41; &#123;<a href="http://boldperspective.com/2011/seo-friendly-dynamic-for-wordpress/" class="read-more right"> Continue Reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Using a good &lt;title&gt; tag is incredibly important for ranking high in the Search Engines. This code will dynamically generate a dynamic &lt;title&gt; tag to improve your WordPress site&#8217;s SEO.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Category Archive for &amp;quot;'</span><span style="color: #339933;">;</span> single_cat_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&amp;quot; | '</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Tag Archive for &amp;quot;'</span><span style="color: #339933;">;</span> single_tag_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&amp;quot; | '</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_archive<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' Archive | '</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Search for &amp;quot;'</span><span style="color: #339933;">.</span>wp_specialchars<span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;quot; | '</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' | '</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'description'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>  <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_404<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Error 404 Not Found | '</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	wp_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> wp_title<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">' | '</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> right <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> bloginfo<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'name'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://boldperspective.com/2011/seo-friendly-dynamic-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boldperspective.com/2011/seo-friendly-dynamic-for-wordpress/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: boldperspective.com @ 2013-05-21 04:26:05 by W3 Total Cache -->
