Hi there,
You can try the before and after arguments instead of link_before and link_after:
https://developer.ww.wp.xz.cn/reference/functions/wp_nav_menu/
Other than that, it really depends on why you need those span tags and what you’re trying to achieve. I’m sure there is some technical solution.
Cheers,
Thomas
thank you very much for your reply. The solution you propose is not viable, since I want to wrap the menu tag and not the link. the reason for wrapping the tag is to place the corresponding schema tag. Indeed, there is another way to do it and it is that when putting the menu tag in the menu configuration, add the <span> to it, but that solution is not very clean, since, in the case of a complex menu, the user would have I have to modify each of the links by hand, when there is link_before and link_after, to do so.