You have to do few things if your wordpress site hacked :
First you have to change the password if your Wordpress admin panel.
Use malware removal service.
Check for unwanted files and folders and remove them.
For more details you can check proper steps to
deal with wordpress website hacked.