how can i find malware code and remove from wordpress site to stop it redirecting to hackers click view pages

ALthough hacking is not a subject that is allowed here (I suspect your question will get put on hold as soon as someone else notices), there are lots of resources available on the googles/bings/ducks to help with cleaning up a site.

The process involves changing credentials everywhere (hosting, ftp, WordPress admin users); updating everything (WordPress, themes, plugins) from original files, looking for rouge files everywhere on the site, and more.

I’ve put together a procedure I use here: https://securitydawg.com/recovering-from-a-hacked-wordpress-site/ .

It takes a bit of time, but has worked for me in the past as I have cleaned sites successfully with that procedure.

Good luck.