Hello :-)
I have created a menu below my header like this:
<div id="menu1">
</div>
My question is: How do I give the Home-link a current-item-class? It works fine on the other links, but Home-link is not marked, when I´m on the Home-page.
I will be very grateful for any help and suggestions. Thanks in advance.
Sorry I´m new. I will try to post my code again:
<div id="menu1">
<ul>
<li><a href="<?php echo get_settings('home'); ?>">Forside</a></li>
<?php wp_list_categories('orderby=ID&title_li='); ?>
</ul>
</div>
this might work:
<div id="menu1">
<ul>
<li <?php if ( is_front_page() ) { echo ' class="current-cat"'; } ?>><a href="<?php echo get_settings('home'); ?>">Forside</a></li>
<?php wp_list_categories('orderby=ID&title_li='); ?>
</ul>
</div>
alternatively try is_home() instead of is_front_page()
Thank you very much. It worked right away:-)