<?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>Sindustries &#187; Css Menu</title>
	<atom:link href="http://www.sindustries.co.uk/web-design-scotland/css-menu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sindustries.co.uk</link>
	<description>Web Design in Scotland Blog.</description>
	<lastBuildDate>Sat, 29 May 2010 02:24:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating a Wordpress Dynamic Highlighting Menu</title>
		<link>http://www.sindustries.co.uk/wordpress-tutorials/creating-a-wordpress-dynamic-highlighting-menu/</link>
		<comments>http://www.sindustries.co.uk/wordpress-tutorials/creating-a-wordpress-dynamic-highlighting-menu/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 21:24:30 +0000</pubDate>
		<dc:creator>Bryan Davis</dc:creator>
				<category><![CDATA[Wordpress Tutorials]]></category>
		<category><![CDATA[Css Menu]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.sindustries.co.uk/?p=257</guid>
		<description><![CDATA[I recently added the “highlighting” feature to my menu because  it &#8217;s really good for usability and helps the user understand where they are on your website.
I’m still learning wordpress but I think I have this menu highlighting sorted.
(I’m also going to assume that you have a css menu and you only require the php [...]]]></description>
			<content:encoded><![CDATA[<p><img class="left" title="wordpress-logo" src="http://www.sindustries.co.uk/wp-content/uploads/2009/04/wordpress-logo.jpg" alt="Wordpress Logo as a sticker." width="200" height="200" />I recently added the “highlighting” feature to my menu because  it &#8217;s really good for usability and helps the user understand where they are on your website.</p>
<p>I’m still learning wordpress but I think I have this menu highlighting sorted.</p>
<p>(I’m also going to assume that you have a css menu and you only require the php to make the menu work.)<br />
<span id="more-257"></span><br />
First of all I had my menu fully coded and had my &#8220;current&#8221; css id affecting the<strong> li</strong> tag o<em>nly</em> I had some trouble with this at the beginning.</p>
<p>Now I opened up the <a title="Wordpress codex to dynamic menu highlighting" href="http://codex.wordpress.org/Dynamic_Menu_Highlighting" target="_blank">wordpress codex</a> , had a little read at that and realized I had to go with step 2.</p>
<h1 class="about-headings"><span style="text-decoration: underline;">The Wordpress Menu Code.</span></h1>
<p>&lt;li&lt;?php if (is_home()){ echo &#8221; id=\&#8221;current\&#8221;";}?&gt;&gt;&lt;a href=&#8221;#&#8221;&gt;Page One&lt;/a&gt;&lt;/li&gt;</p>
<p>Now the above line of code checks to see of the page your on is the home page, if so then it simply writes id=”current”.</p>
<p>Neat eh?</p>
<h2 class="about-headings"><span style="text-decoration: underline;">The Variables for the Wordpress Menu Code.</span></h2>
<p>Also there are other variables for “is_home” such as: -</p>
<ul>
<li>is_front_page &#8211; Highlights what ever page you set as your front page in the “settings&gt;reading” section.</li>
<li>is_home &#8211; Highlights the blog&#8217;s &#8220;home page&#8221; (I suggest using this on the menu item that links to all your websites post or what ever is your static front page.)</li>
<li>is_page &#8211; Highlights any buttons using a page template.</li>
</ul>
<p>There is also an option for “is_page” to apply the “current” id depending on the ‘page slug’ this is done by the following code: -</p>
<p>&lt;li&lt;?php if ( is_page(’about’) ) { echo ‘ id=”current”‘; } ?&gt;&gt;&lt;a href=”http://www.sindustries.co.uk/about/” title=”Find out more info about Sindustries.”&gt;About&lt;/a&gt;&lt;/li&gt;</p>
<p>The code above checks to see if the slug is “about” and if so it prints id=”current”.</p>
<h3 class="about-headings"><span style="text-decoration: underline;">A few points to remember and how to avoid errors.</span></h3>
<p>I must make you aware however if your custom front page is using “home.php” it will highlight that page <strong>and</strong> your blog page.</p>
<p>To get round this you must have a custom static page and define your posts page in the “settings&gt;reading” section.</p>
<p>Menu highlights are a great usability feature to basically give the user information on what page they are actually viewing so there should be nothing stopping you implementing this feature to your own website/wordpress blog.</p>
<p>I hope this helps you out when you’re creating your own menu!</p>
<p>Bryan</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sindustries.co.uk/wordpress-tutorials/creating-a-wordpress-dynamic-highlighting-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
