Typing local WordPress URL works, but clicking the same link does not

Check the page’s source via your browser. And see if the links have a different “href=xxx” URL from the anchor text.

It’s the only explanation unless your pages also have JS that rewrites the URLs on load or in the onclick event.