Adding individual classes to get_links (syntax query)
-
Good Evening,
Hopefully an easy one for the php inclined, I think it’s just a syntax matter.
I am using the following code for my global navigation (outside the loop):
<ul id="globalnav"><?php echo get_links(3, '<li>', '</li>', ' + ', TRUE, 'id', FALSE, FALSE, 6, FALSE); ?> </ul>
*I wish to add an individual class to the
<li>
tags using either thelink_name
orlink_id
(i.e.<li class="link_name">
but I’m not sure how to call up this information in this context.The desired outcome is that I can use the cascade to highlight the current section of the site being used without needing to alter the globalnav code for each section.
*Admittedly some of the other parameters in get_links may be different a I’m altering code that I have used for another group of links.
Thanks xxx
- The topic ‘Adding individual classes to get_links (syntax query)’ is closed to new replies.