• Resolved meepy

    (@meepy)


    Hi!

    I have been messing with WordPress for the past week. I have converted all now. But I have a minor problem with my menu.

    As you can see on http://www.meepy.dk – the menu “highlights” (.current_page_item) when you are on the page.

    But how do I make so when I am on my front page, “blog”-link is highlighted?

    This is my code:

    <ul>
    <li><a href="<?php bloginfo('url');?>">blog</a></li>
    <?php wp_list_pages('title_li=&sort_column=menu_order'); ?>
    </ul>

    As you can see its static, is there a way around this to get a “home” link dynamic, so I can style it with “.current_page_item”?

    Thanks in advance,
    [Moderated: Sig removed (see Forum Rules, section E)]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try:

    <li<?php if(is_home()) echo ' class="current_page_item"'; ?>><a href="<?php bloginfo('url'); ?>">blog</a></li>
    <?php wp_list_pages('title_li=&sort_column=menu_order'); ?>

    Thread Starter meepy

    (@meepy)

    Thank you for you reply, works like a charm! Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Highlight “home” link.’ is closed to new replies.