<?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>CAM Web Design &#187; HTML</title>
	<atom:link href="http://camwebdesign.com/category/techniques/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://camwebdesign.com</link>
	<description>High quality, cost effective wed design and hosting solutions</description>
	<lastBuildDate>Mon, 12 Dec 2011 11:48:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using HTML5 with your Thematic Child Theme</title>
		<link>http://camwebdesign.com/techniques/using-html5-with-your-thematic-child-theme/</link>
		<comments>http://camwebdesign.com/techniques/using-html5-with-your-thematic-child-theme/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 02:32:38 +0000</pubDate>
		<dc:creator>Troy</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://camwebdesign.com/?p=1180</guid>
		<description><![CDATA[In the interest of keeping our websites &#8220;future-proof&#8221;, I began investigating using the HTML5 DOCTYPE. As it turns out, the switch for most WordPress themes will be trivial: Change the doctype declaration to: &#60;&#33;DOCTYPE html&#62; Remove the (now defunct) profile="..." attribute from the opening &#60;head&#62; tag. Remove the unnecessary &#60;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&#62; tag. Add <a href="http://camwebdesign.com/techniques/using-html5-with-your-thematic-child-theme/" class="more-link">(more...)</a>]]></description>
			<content:encoded><![CDATA[<p>In the interest of keeping our websites &#8220;future-proof&#8221;, I began investigating using the HTML5 DOCTYPE.</p>
<p>As it turns out, the switch for most WordPress themes will be trivial: </p>
<ol>
<li>Change the doctype declaration to: <code>&lt;&#33;DOCTYPE html&gt;</code> </li>
<li>Remove the (now defunct) <code>profile="..."</code> attribute from the opening <code>&lt;head&gt;</code> tag.</li>
<li>Remove the unnecessary <code>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;</code> tag.</li>
<li>Add the <code>&lt;meta charset="utf-8"&gt;</code> tag.</li>
</ol>
<p>Normally, this would be easily found in the <code>header.php</code> file of your theme.  In fact, the default WordPress theme (&#8216;<a href="http://2010dev.wordpress.com/">TwentyTen</a>&#8216; as of WP3) automatically uses the HTML5 doctype declaration.</p>
<p><a href="http://themeshaper.com/thematic/">Thematic</a>, however, uses the traditional &#8220;XHTML 1.0 Transitional&#8221; doctype<span id="more-1180"></span> that WordPress has used for years.  In order to use the HTML5 doctype, you will need to override four standard Thematic functions: <code>thematic_create_doctype</code>, <code>language_attributes</code>, <code>thematic_head_profile</code> and <code>thematic_create_contenttype</code> within your <a href="http://codex.wordpress.org/Child_Themes">child theme&#8217;s</a> <code>functions.php</code> file (<a href="http://camwebdesign.com/?p=1593">you are using a child theme, aren’t you?</a>), thusly:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//replace the standard doctype declaration and html tag opening...</span>
<span style="color: #000000; font-weight: bold;">function</span> html5_create_doctype<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;!DOCTYPE html&gt;&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;html&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thematic_create_doctype'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'html5_create_doctype'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//replace the lang attribute in the opening &lt;html&gt; tag...</span>
<span style="color: #000000; font-weight: bold;">function</span> html5_language_attributes<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;lang=<span style="color: #000099; font-weight: bold;">\&quot;</span>en<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'language_attributes'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'html5_language_attributes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//replace the &lt;head&gt; tag opening to remove the now defunct profile attribute and add the &lt;meta charset=&quot;utf-8&quot;&gt; tag...</span>
<span style="color: #000000; font-weight: bold;">function</span> html5_head<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;head&gt;&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;meta charset=<span style="color: #000099; font-weight: bold;">\&quot;</span>utf-8<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thematic_head_profile'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'html5_head'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//remove the now defunct &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt; tag...</span>
<span style="color: #000000; font-weight: bold;">function</span> html5_create_charset<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thematic_create_contenttype'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'html5_create_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://camwebdesign.com/techniques/create-a-wordpress-child-theme-allow-updates/" rel="bookmark" title="January 23, 2011">Create a WordPress Child Theme, allow updates</a></li>
<li><a href="http://camwebdesign.com/techniques/redefine-twenty-ten-header-image-width-and-height/" rel="bookmark" title="January 23, 2011">Redefine Twenty Ten header image width and height</a></li>
<li><a href="http://camwebdesign.com/techniques/remove-default-wordpresstwenty-ten-header-images/" rel="bookmark" title="January 23, 2011">Remove default WordPress Twenty Ten header images</a></li>
</ul>
<p><!-- Similar Posts took 15.698 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://camwebdesign.com/techniques/using-html5-with-your-thematic-child-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

