Unfortunately, it doesn’t work 100% as I’d like. It DOES wrap the word ‘Our’ in a span with a class of ‘our’. But it also strips the second word out of the anchor tag completely so it’s no longer part of the link, seemingly adding an extra anchor end. I can’t figure out why this is. Any help?
So what originally was this: <a href="http://nameofsite.com/departments/">Our Departments</a>
then becomes this: <a href="http://nameofsite.com/departments/"><span class='our'>Our</a> Community</a>
Thanks! (also I’m not sure if Themes and Templates is the right section for this…)
Ha, yep. I figured that out about 5 minutes after I posted this… unfortunately my post seemed to disappear from the site, and when I did find it, I was unable to delete or edit it. Thanks for the help.
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Use str_replace to replace words in wp_nav_menu output?’ is closed to new replies.