Created
August 27, 2014 19:59
-
-
Save martynchamberlin/f2e664bfb14c2e96ee85 to your computer and use it in GitHub Desktop.
Remove White Space Between <li> Elements in a Genesis Menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Having `display: inline-block` works great as long as there isn't white space. | |
*/ | |
add_filter('genesis_do_nav', 'remove_whitespace'); | |
function remove_whitespace( $str ) | |
{ | |
$str = str_replace( "\r\n", "", $str ); | |
$str = str_replace( "\r", "", $str ); | |
$str = str_replace( "\n", "", $str ); | |
return $str; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment