Replace empty a-tags in nav walker
-
Hi there, currently i’am using the default nav walker to build my header navigation. In this menu i do have a empty nav point in depth 0. This menu item isn’t cklickable, because the href is empty. Thats fine. But google lighthouse decreased the seo points, because its a empty a-tag. My plan is to remove the tag with a simple span-tag. But how? The default nav walker always a fixed a-tag.
Solution a) is to use a preq_replace in my functions.php. Solution b) is to use a custom nav walker. Solution c) is to use a “#” and disable the click event (with js or css). Is there a “best way to go” solution?
Bye and thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Replace empty a-tags in nav walker’ is closed to new replies.