We would need a link to your page to see what you’re talking about.
I’ve tried with the conditional tag current_page_item and relative class applied to a css with a:visited…
Actually, it has nothing to do with “a:visited” – that one is a selector for items that ALREADY have been seen/clicked.
Need to learn more about CSS… you jsut need to define the “current_page_item” in the stylesheet.
More: http://codex.wordpress.org/Dynamic_Menu_Highlighting
I’ll send you the code relative to the header.php and page.php and of course the css relative to “current_page_item” tag.
Thanx
This is my menu in hader.php
<div class=”navigation”>
NdC
Master
</div>
This is part of page.php where I verify which page is requested
<?php if (is_page(11) || is_page(12) || is_page(13) || is_page(14) ) {include (‘sidebar_ndc.php’); }
elseif (is_page(15) || is_page(16) || is_page(17) ) {include (‘sidebar_master.php’); }
else {include (‘sidebar.php’); }?>
This is the entire sidebar_ndc.php file
<div class=”sidenav”>
<form method=”get” id=”searchform” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
<input name=”s” type=”text” id=”s” value=”<?php echo wp_specialchars($s, 1); ?>” size=”17″ />
<input type=”submit” id=”sidebarsubmit” value=”Search” />
</form>
<ul class=”current_page_item”>
- <?php wp_list_pages(‘include=11,12,13,14&title_li=’); ?>
</div>
This is part of style.css
.current_page_item li {
color: #FF0000;
}
Backing to my original post, how can I resolve thet problem?
Thanx.
Matteo
moshu had the correct answer, look at his reference. Also, don’t use a:visited, just use a.
Thanx Otto42 but which reference?
Errr… The one moshu posted above. What other reference is there?
http://codex.wordpress.org/Dynamic_Menu_Highlighting
oops….I tried but it doesn’t work or most probably I’m not good to make it work!
Can you write me down an example based on my case.
Be patient, I’m newby in PHP and WordPress.
Thanx
I solved the situation with this CSS line:
.page_item a {
color: #554;
}
.current_page_item a:visited {
color: #FF0000;
}
the first one restore the a color to they original one and the second color of red the a:visited link.
Rude but it works 🙂