Inserting id=” ” dynamically
-
Hello
I was wondering if anyone would know how to dynamically insert an id value into a category list. For instance, I am pulling the children of a category dynamically from WP, when someone clicks on the link and is brought to the sub-section, I would like the list item to be highlighted.
Something like:
- Main Category
- Child Category
When someone clicks on Child Category, I want it to look like:
- Main Category
-
<li id="current">Child Category
Is there a way to set this up in WordPress so that it will automagically insert id=”current” whenever a sub-category is clicked on?
Thanks in advance and any help is appreciated
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Inserting id=” ” dynamically’ is closed to new replies.