Cool! What do you mean my code doesn’t work though?
Sorry, I meant that when I installed your replacement fontawesome_replace function, I did not get more than one class – only the first class got put into the li.
In order to verify I had made the code change (no caching issues, etc.) I started to put in debug statements.
Do you mean that it doesn’t work the way you wanted it to work?
It appears to REMOVE the two icon font classes from the original $nav.
Basically by placing the print $nav; you are not letting the plugin to do its job and create the <i class=”…”></i> right before the link text. You are just leaving the classes in the
- element, which is the default in WordPress.
Ah… sorry, didn’t get that point. But having the classes in the li element is causing the font icons render properly, and before the actual li text. So not sure what having them properly in an i element would get us.