CSS: Current State in Categories List
-
I would like to show a “current tab” in my categories list, which I use for the main nav of my site https://skebrown.com. I am working on this from the article ALA: Sliding Dooors of CSS. https://www.alistapart.com/articles/slidingdoors/
- Category 1
- Category 3
<li id="current">Category 2
Here is what I am using as my main nav:
<ul id="catnav">
<?php wp_list_cats('sort_column=name'); ? >How do I get the id=”current” properly into the category list for the active category?
I understand that if I could get the below example into thetags, my worries would be over. However, I am stumped since the
and categories are coming from the db?
-
<li<?php if ($thisPage=="Page One")
echo " id=\"currentpage\""; ?>>
Page One
<li<?php if ($thisPage=="Page Two")
echo " id=\"currentpage\""; ?>>
Page Two
<li<?php if ($thisPage=="Page Three")
echo " id=\"currentpage\""; ?>>
Page Three
<li<?php if ($thisPage=="Page Four")
echo " id=\"currentpage\""; ?>>
Page Four
Any help would be appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘CSS: Current State in Categories List’ is closed to new replies.