Are you trying to set a current page class to your links? WordPress already does this when you use wp_list_pages and wp_list_categories. It already knows what page you’re on, and will assign a “current-page-item” or “current-cat-item” class to the link associated with it.
I hate to hi-jack a thread but here is the link to my thread explaining exactly what I was trying to do… LINK
You can reply here that would be awesome. or on mine. or on both. I have static and dynamic links on my page in an <ul> I would like to be able to have 5 static links on every page and then have the ability to dynamically bring in 1 to 5 other links.
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Dynamic links – assign ID/class’ is closed to new replies.