<?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>Get WordPressed &#187; alternate heading</title>
	<atom:link href="http://www.getwordpressed.com/tag/alternate-heading/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.getwordpressed.com</link>
	<description>Get on the WordPress Bandwagon</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:30:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>H1 Hack for WordPress Pages</title>
		<link>http://www.getwordpressed.com/seo/h1-hack-for-wordpress-pages/</link>
		<comments>http://www.getwordpressed.com/seo/h1-hack-for-wordpress-pages/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 19:03:40 +0000</pubDate>
		<dc:creator>Heather</dc:creator>
				<category><![CDATA[Learning Wordpress]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Wordpress Code]]></category>
		<category><![CDATA[Wordpress Hack]]></category>
		<category><![CDATA[alternate heading]]></category>
		<category><![CDATA[custom field]]></category>
		<category><![CDATA[H1 tag]]></category>
		<category><![CDATA[heading change]]></category>
		<category><![CDATA[page title]]></category>
		<category><![CDATA[theme editing]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.getwordpressed.com/?p=41</guid>
		<description><![CDATA[<p>WordPress H1 Hack - This allows you to change the H1 tag of the page without affecting the page name, title, and menu title of the page. This has most commonly been used in the page.php file of the WordPress themes only, but can certainly be applied to any page that you would like the [...]</p><p>The original post is titled <a href="http://www.getwordpressed.com/seo/h1-hack-for-wordpress-pages/">H1 Hack for WordPress Pages</a> , and it came from <a href="http://www.getwordpressed.com">Get WordPressed</a> . </p>]]></description>
			<content:encoded><![CDATA[<p><strong>WordPress H1 Hack -</strong><br />
This allows you to change the H1 tag of the page without affecting the page name, title, and menu title of the page.</p>
<p>This has most commonly been used in the page.php file of the WordPress themes only, but can certainly be applied to any page that you would like the ability to set the h1 tag (or some cases, if you prefer, the h2 tag). Remember, it is recommended to set the default theme h2 tags displaying the header of the pages to H1 for an SEO advantage.</p>
<p>This documentation will demonstrate applying this hack to page.php in your theme, but can easily be understood from that point on doing the same to your template pages, index.php, single.php, etc.</p>
<p><strong>Step by Step:</strong><br />
1. You will need to be using an installed version of WordPress at least 2.x or greater as this method uses the “Custom Fields” you will find toward the bottom of the page in the admin area as you create or edit pages or posts.</p>
<p>2. In your favorite editor for editing your theme pages, or using the Theme Editor under the Presentation tab of the WordPress admin area, open pages.php for editing.</p>
<p>3. In the default theme of WordPress or the theme you are using, you will see a section toward the top of the file that looks exactly like or similar to this:</p>
<p><img src="http://www.getwordpressed.com/images/h1hackdocumentation/screenshots-pagecode.png" border="0" alt="" width="500" height="275" /></p>
<p>It&#8217;s this line &#8211; <span style="color: #ff0000; font-size: x-small;">&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt; </span> that you will be changing. It may not look exactly the same, but will almost always be enclosed in h2 tags.</p>
<p>You will want to replace the contents inside those tags, but it is highly recommended that if they currently say &lt;h2&gt;&lt;/h2&gt; to change those to h1.</p>
<p>4. Replace that line with the following:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">&lt;h1&gt;<span class="kw2">&lt;?php</span> <span class="re0">$thisPost</span> <span class="sy0">=</span> <span class="re0">$post</span> <span class="sy0">-&gt;</span> <span class="me1">ID</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">&#40;</span>get_post_meta<span class="br0">&#40;</span><span class="re0">$thisPost</span><span class="sy0">,</span> changeH1<span class="sy0">,</span> <span class="kw4">true</span><span class="br0">&#41;</span> <span class="sy0">!=</span> <span class="st_h">&#8221;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">echo</span> <span class="br0">&#40;</span>get_post_meta<span class="br0">&#40;</span><span class="re0">$thisPost</span><span class="sy0">,</span> changeH1<span class="sy0">,</span> <span class="kw4">true</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">the_title<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy1">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&lt;/h1&gt;</div>
</li>
</ol>
</div>
</div>
<p>So your file should now look similar to this:</p>
<p><span style="color: #ff0000; font-size: x-small;"> <img src="http://www.getwordpressed.com/images/h1hackdocumentation/screenshots-pagecodeedited.png" border="0" alt="" width="500" height="451" /></span></p>
<p>5.  Save the file and upload it to your theme folder or save the file in the  theme editor.</p>
<p>6. Now you can edit or create new pages and use the custom  fields to change the heading of the page without changing the actual title  of the page.</p>
<p>7. To do this, as an example, let’s create a new page named  “Test”.</p>
<p>8. Publish the page, then view it from your WordPress site.</p>
<p>9. You  can see that not only the title in the browser, in the menu, and the heading  of the page says “Test”.</p>
<p><span style="color: #ff0000; font-size: x-small;"> <img src="http://www.getwordpressed.com/images/h1hackdocumentation/screenshots-test.png" border="0" alt="" width="500" height="204" /></span></p>
<p>10. Now back to the admin area, edit the page  “Test”.<br />
11. Scroll to the bottom of the editing area until you see “Custom  Fields”.<br />
12. You may have to click on the “+” sign to the right to see the  area for editing these fields.</p>
<p><span style="color: #ff0000; font-size: x-small;"> <img src="http://www.getwordpressed.com/images/h1hackdocumentation/screenshots-customfields.png" border="0" alt="" width="400" height="234" /></span></p>
<p>13. Here you will need to add “changeH1” to the key  text box for the first time. Be sure that changeH1 is spelled exactly the  same and the “H” is capitalized.</p>
<p>14. After you have done this the first time, you  will be able to select the changeH1 from the drop-down box under the word  Key instead. It is only necessary to add the key once with a value, and from  that point, it will remain in the drop-down list to be selected easier.</p>
<p>15. Now change the header by typing a new one in  the Value text box to the right. Let’s just test it out by typing “This is  my new heading text”. Then click “Add Custom Field”.</p>
<p>16. Save and continue, or save the page now.</p>
<p>17. Go back to your site and refresh to see the  change.</p>
<p><span style="color: #ff0000; font-size: x-small;"> <img src="http://www.getwordpressed.com/images/h1hackdocumentation/screenshots-testnewheader.png" border="0" alt="" width="500" height="204" /></span></p>
<p>18. Now you can edit any page to display a  different heading just by setting the “changeH1” key in the drop-down list  and typing in the heading you want in value. Don’t forget to click “Add  Custom Field”.</p>
<p>19. If you have already set a heading in a page  using this method, you can also go back to editing the page, and change the  value in the box just above where you set it originally. After making the  change click on “update”.</p>
<p><span style="color: #ff0000; font-size: x-small;"> <img src="http://www.getwordpressed.com/images/h1hackdocumentation/screenshots-alreadyset.png" border="0" alt="" width="500" height="311" /></span></p>
<p>The original post is titled <a href="http://www.getwordpressed.com/seo/h1-hack-for-wordpress-pages/">H1 Hack for WordPress Pages</a> , and it came from <a href="http://www.getwordpressed.com">Get WordPressed</a> . </p>]]></content:encoded>
			<wfw:commentRss>http://www.getwordpressed.com/seo/h1-hack-for-wordpress-pages/feed/</wfw:commentRss>
		<slash:comments>84</slash:comments>
		</item>
	</channel>
</rss>

