• Hey.

    I am having problems with my first page (blog).
    I would like the “hem” (blog) in the menu to turn black when I´m at that page.
    At this moment it doesn´t change like the other pages do (when they are active).

    I have tried to put a current_page_item in the css, but that didn´t help. What should I do? Is the problem in the css or in the php? What should I change to what?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can you share the link please?

    Have you tried using <?php if (is_index()) { echo “current-page”; } ?> on the hem li class?

    Thread Starter moonwoff

    (@moonwoff)

    Oh, sorry.

    My link

    Where exactly should I put that in the li?

    so it should look like this:

    <li class="<?php
        if (is_index()) {
           echo "current-page";
        } ?> your current class that's there already">
    Thread Starter moonwoff

    (@moonwoff)

    That doesn´t work.

    I put it like this

    <ul id="nav">
                       <li class="<?php
        if (is_index()) {
           echo "current-page";
        } ?> class="page_item">
                      <a href="<?php echo get_settings('home'); ?>/" title="Hem">Hem</a></li>
                      <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘current page problems’ is closed to new replies.