How to modify the output of the _wp_menu_output function of menu-header.php file
-
I’ve come across a situation in which I have visible gaps in between list items in my nav menu bar. I’ve read many discussions about this problem on the web (here for example and here), and there are some problematic workarounds; but the real solution, I’ve found, is to either remove the “\n\t” characters before
<li>
items in the html code that is generated by the _wp_menu_output function of the menu-header.php file, or to encapsulate them with an html comment like so:<!--\n\t-->
.The problem I’m having is that this .php file is a WordPress codex file and so overriding it does not appear to be a good option, and there are no filters or hooks declared in the file, so I’m just not sure what the best method of overriding this function is. So I ask:
How can I modify the output of the _wp_menu_output function of the menu-header.php file to comment out those pesky “\n\t” characters?
- The topic ‘How to modify the output of the _wp_menu_output function of menu-header.php file’ is closed to new replies.