When using wp_nav_menu how do I make it so ‘after’ => does not show on the last element of the list?
Leave a Reply
You must be logged in to post a comment.
When using wp_nav_menu how do I make it so ‘after’ => does not show on the last element of the list?
You must be logged in to post a comment.
You can hide it with CSS. For example, if your
after
looks like:Then your css:
While this can be done with JS, it might be more tidy to use
wp_nav_menu
filter, through which final output of menu is passed before returning/echoing.Found this on another Answer
https://wordpress.stackexchange.com/a/105562/105 , but this question came up first when searching; so cross linking for future searchers