Welcome to WebmasterWorld Guest from 107.20.5.156

Forum Moderators: not2easy

Message Too Old, No Replies

A href on class on LI

     

piznac

9:03 pm on Jul 27, 2009 (gmt 0)

5+ Year Member



Im having an issue with a dynamic menu on wordpress. I've got everything working but I cant seemt o get the link to change color on a new class.

.current_page_item{
background-color: #FFFFFF;
}
.current_page_item a {
color: #000000;
}

<ul>

<?php if(is_home() && !is_paged()){ ?>
<li<?php
if (is_home())
{
echo " class=\"current\"";
}
?>>
<a href="<?php echo get_settings('home'); ?>" title="You are Home">Home</a>
</li>
<?php } else { ?>
<li<?php
if (is_home())
{
echo " class=\"current\"";
}
?>>
<a href="<?php echo get_settings('home'); ?>" title="Click for Home">Home</a>
</li>
<?php } ?>
<!--See Note 3-->
<?php

wp_list_pages('sort_column=menu_order&title_li=');

?>

</ul>

how would I apply a link color to a class applied to a li? This does not appear to be working.

abidshahzad4u

3:04 pm on Jul 29, 2009 (gmt 0)

5+ Year Member



Would you explain this. As you have declared class with name different from that used in the statement. i.e. current_page_item was defined but applied one name is current.