• I followed the other posts and still can’t get it to work.

    So I have my conditional, then my style, the import css tag, the #mainmenu id’s, etc.

    The last tag I have with the current is:
    #mainmenu a:hover, #mainmenu #<?php echo $current ?> a:active {
    padding-bottom: 1em;
    color: #fff;
    background: url(‘images/main_hover.gif’) bottom center no-repeat;
    }

    Is the $current tag being called right? Or am I missing something completely?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Where is $current being assigned a value, and what is it? And I’m assuming this is *not* in the style.css.

    Thread Starter dommega

    (@dommega)

    So it is not in the style.css. This is in the <style></style> tag in header.php.

    current is being assigned in this :

    <?php
    if ( is_page(‘home’) ) { $current = ‘a’; }
    elseif ( is_category(’25’) ) { $current = ‘b’; }
    elseif ( is_page(‘5’) ) { $current = ‘c’; }
    elseif ( is_page(‘4’) ) { $current = ‘d’; }
    elseif ( is_category(‘2’) ) { $current = ‘e’; }
    elseif ( is_page(‘8’) ) { $current = ‘f’; }
    ?> which is above the <style>tag.

    Looking at the code I don’t see anything in error (although you may want to provide '#a', '#b' for the value of $current, or else you end up with a blank unique id declaration (#) on other pages/query types.

    Thread Starter dommega

    (@dommega)

    Wow talk about dumb mistake. As the current state I was calling an image in the id tag. For some reason, I had to put the absolute url in the background: url() tag.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Another Dynamic Page Highlighting Problem’ is closed to new replies.