Hello!
I'm trying to get this menu to work on my custom theme:
The menu links are hardcoded into the header.php template. As you can see I use 'Home' one page and four categories. Here's the code I have tried to use:
</p>
<ul>
<?php if(is_home() && !is_paged()){ ?><br />
<!-- li><br />
<a>" title="You are Home">Blog Navigation</a><br />
</li --><br />
<?php } else { ?></p>
<li>
<a>" title="Click for Home">Home</a>
</li>
<p> <?php } ?></p>
<li>
<a <?php<br />
if (is_category('Photography') || in_category('27') && !is_single())<br />
{<br />
echo " class=\"current\"";<br />
}?> href="<?php bloginfo('url') ?>/category/photography">Photography
</li>
<li>
<a <?php<br />
if (is_category('The Interweb') || in_category('25') && !is_single())<br />
{<br />
echo " class=\"current\"";<br />
}?> href="<?php bloginfo('url') ?>/category/the-interweb">The Interweb
</li>
<li>
<a <?php<br />
if (is_category('Motorsport') || in_category('24') && !is_single())<br />
{<br />
echo " class=\"current\"";<br />
}?> href="<?php bloginfo('url') ?>/category/motorsport">Motorsport
</li>
<li>
<a <?php<br />
if (is_category('Everything Else') || in_category('28') && !is_single())<br />
{<br />
echo " class=\"current\"";<br />
}?> href="<?php bloginfo('url') ?>/category/everything-else">Everything Else
</li>
<li>
<a <?php<br />
if (is_page('Contact'))<br />
{<br />
echo " class=\"current\"";<br />
}?> href="<?php bloginfo('url') ?>/contact">Contact
</li>
</ul>
<p>
Issue 1:
When on the homepage the 'Motorsport' link is highlighted.
Issue 2:
When on the contact page the 'Everything Else' link is highlighted.
Issue 3:
If you click though to a single post the menu loses it's highlighting.
Has anyone tried something like this before? or do you have any ideas how I can make this work???
Looking forward to hear your response...
Cheers,
Rich