PHP and DHTML menus
-
Ok, this is a WordPress, PHP, DHTML menu question.
So here is my present code (skimmed down for easy reading):
[code]
<li<?php if (is_home()) {echo " id\"current\""; } ?>>Home
<li<?php if (is_page(car)) {echo " id\"current\""; } ?>>Car
[/code]So the problem I’m having is that when a person clicks, lets say Car, it puts a border-bottom under it (which is what I want), but when a person goes to a sub page under that main link, the border-bottom disappears. Is there a way to make it so that no matter what sub page under a main page is selected, the border-bottom will always appear under the main page?
Here is another example:
Main Page –>
[url]https://dev.abunchofcars.com/featuredride/[/url]Sub Page of the Main Page –> [url]https://dev.abunchofcars.com/featuredride/rich_cl/[/url]
Thanks!
- The topic ‘PHP and DHTML menus’ is closed to new replies.